1

In the project properties, I have set "Source/Binary format" to JDK 5. (Erraneously, I had 6 before, but we need to use 5 in my project.)

However, when designing a UI panel, the created code each time again contains features that need a higher Java version (like the diamond operator <>, and things like JComboBox<String>() ).

So when compiling, I get:

error: diamond operator is not supported in -source 1.5 jComboBox1 = new javax.swing.JComboBox<>(); (use -source 7 or higher to enable diamond operator)

I have even edited all the .form files, where it says <Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> instead of maxVersion="1.7" which I found there.

But it still keeps creating code containing the diamond operator, even for new forms that I create from scratch! This is driving me crazy - any ideas what I need to do to Netbeans to accept my Java 1.5 setting?

Philippp
  • 847
  • 1
  • 8
  • 17

0 Answers0