This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206209 - Diagnositc message was: "diamond operator is not supported in -source 1.6 (use -source 7 or higher to enable diamond operator)". Compare this to the JVM version reported below
Summary: Diagnositc message was: "diamond operator is not supported in -source 1.6 ...
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-10 00:07 UTC by hgladney
Modified: 2017-10-27 03:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hgladney 2011-12-10 00:07:24 UTC
Product Version = NetBeans IDE 7.0.1 (Build 201107282000)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 21.0-b17
Comment 1 hgladney 2011-12-10 00:08:11 UTC
A couple of other users reported the same discrepancy about a year ago.
Comment 2 Milutin Kristofic 2011-12-12 10:57:43 UTC
In properties of application/module you need to setup in sources: source/binary format: JDK 7 and you also need to have in libraries java platform jdk 7. 

It doesn't matter on which java your netbeans works, it's important what setup your project has. Please, can you check source/binary and java platform? If there is still problem, please reopen.
Comment 3 ffchung 2017-10-24 05:20:52 UTC
netbeans 8.2
java 1.8

Project set source to java 1.6


in Swing GUI Editor, add a JList
and try to build.

it will show diamond operator is not supported in -source 1.6.

It because the GUI Editor will gen the source with diamond operator.

in function private void initComponents()

jlist = new javax.swing.JList<>();

it will not change to old format as I select the source as 1.6