Changing java platform on which netbeans runs
JavaNetbeansJava Problem Overview
I am using Netbeans 6.7. I had first installed Java 1.5 before installing Netbeans. When i installed Netbeans it took Java 1.5 as the default version. Then i installed Java 1.6 on my machine. I need to change the default JDK of my netbeans to 1.6 not only to a specific project but to the whole Netbeans application.
Java Solutions
Solution 1 - Java
You can change the JDK for Netbeans by modifying the config file:
- Open
netbeans.conf
file available underetc
folder inside the NetBeans installation. - Modify the
netbeans_jdkhome
variable to point to new JDK path, and then - Restart your Netbeans.
Solution 2 - Java
In my Windows 7 box I found netbeans.conf in <Drive>:\<Program Files folder>\<NetBeans installation folder>\etc
. Thanks all.
Solution 3 - Java
For anyone on Mac OS X, you can find netbeans.conf
here:
/Applications/NetBeans/NetBeans <version>.app/Contents/Resources/NetBeans/etc/netbeans.conf
In case anyone needs to know :)
Solution 4 - Java
open etc folder in netbeans folder then edit the netbeans.conf with notepad and you will find a line like this :
> Default location of JDK, can be > overridden by using --jdkhome >
> netbeans_jdkhome="G:\Program > Files\Java\jdk1.6.0_13"
here you can set your jdk version.
Solution 5 - Java
on Fedora it is currently impossible to set a new jdk-HOME to some sdk. They designed it such that it will always break. Try --jdkhome [whatever] but in all likelihood it will break and show some cryptic nonsensical error message as usual.
Solution 6 - Java
Fix this by moving my jdk folder to other disk