Change JRE in a NetBeans project
Asked Answered
S

3

14

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?

Schiller answered 8/11, 2010 at 21:29 Comment(0)
D
21
  • 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 menu ToolsJava Platform Manager.
  • If JDK 1.6 is not in the list, you can add it there.
Disraeli answered 10/11, 2010 at 8:32 Comment(0)
C
2

In NetBeans 8.2,

  • right click the project, and select Properties
  • under the menu build/compile, select the Java platform from the drop down menu
Calmas answered 6/12, 2017 at 9:41 Comment(0)
I
0

There is a bug in NetBeans 8.0.2

When undertaking the steps in OliBlogger's answer in changing JRE or JDK for a project, NetBeans attempts to save the project with the new JDK (9 in this instance), but it goes into an infinite loop and eventually gives an OutOfMemoryError:

Infinite loop while saving new project with new JDK

OutOfMemoryError

Institutor answered 22/10, 2017 at 13:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.