Change JRE in NetBeans project

griegs picture griegs · Nov 8, 2010 · Viewed 22.2k times · Source

I have a NetBeans project which is using the JRE 1.4 environment which means I can't use generics.

How can I change the project to use 1.6 (?) so I can use generics.

Answer

OliBlogger picture OliBlogger · Nov 10, 2010
  • In the Project tab, Right Click on the Project and select Properties.In the Library category select Java Platform JDK 1.6.
  • Then, in the Source category select Source/Binary Format JDK6.
  • This assumes that you installed JDK 1.6 and NetBeans knows about this.
  • JDK 1.6 must be known to NetBeans as a Java Platform.
  • From the menu select Tools->Java Platform Manager.
  • If JDK 1.6 is not in the list you can add it there.