I have JDK 1.6, JRE6 and JRE7 (64-bit & 32-bit) installed in my PC.
I am using Netbeans 7.3 BETA 2 and it is using JDK 6 and JRE 6.
I want to change it to JRE7. How can i achieve this ?
I have checked in Stackoverflow itself and found that we have to change the netbeans.conf file content for the netbeans_jdkhome value to the path of new Java path.
In another stackoverflow question, I found How to specify which JRE to use in Netbeans?.
But, in this also, I am not able to find how to get this resolved. Can anybody help on this ?
My installation path is as follows,
JDK6 path - C:\Program Files (x86)\Java\jdk1.6.0_31
JRE6 path - C:\Program Files (x86)\Java\jre6
JRE7 path - C:\Program Files (x86)\Java\jre7 (32-bit)
JRE7 path - C:\Program Files\Java\jre7 (64-bit)
Thanks in advance.
Modify compiler version for a project on NetBeansRight-click on project, go to Properties. Go to “Sources”, then “Sources/Binary Format” and choose the corresponding JDK version (I had to).
The Apache NetBeans IDE will run under the specified JDK. So to change JDK for NetBeans, to update the netbeans_jdkhome property in the netbeans. conf file which can be found under installation directory > netbeans > etc directory.
The default installation directory of a static JRE is C:\Program Files (x86)\Java\jre n (for 32-bit versions) or C:\Program Files\Java\jre n (for 64-bit versions), where n is the full Java SE release and update number (for example, n = 1.8.
Goto Tools -> Platforms
Click "Add Platform", browse to the location where the JDK you want to add is installed....
Click on the JDK you want to add and select "Finish"
Updating projects
You can change the platform that projects use, by right clicking the project node and selecting properties and selecting Libraries
. Here you change the platform that the project will use to build the classes with.
You can also change the source/binary format (version) which Netbeans is expecting to use. For example, you use JDK 7, but build/develop for Java 6
Changing the JDK that Netbeans itself uses to run
Goto {install/location/of/Netbeans}/etc
and open the netbeans.conf
.
There is a property called netbeans_jdkhome
(it was towards the end of my file). You change this to what ever JDK you want Netbeans to be launched with
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With