Dinesh
Dinesh

Reputation: 16436

Setting JRE in Netbeans

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.

Upvotes: 10

Views: 28711

Answers (1)

MadProgrammer
MadProgrammer

Reputation: 347332

Goto Tools -> Platforms

enter image description here

Click "Add Platform", browse to the location where the JDK you want to add is installed....

enter image description here

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.

enter image description here

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

enter image description here

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

Upvotes: 21

Related Questions