Changing java platform on which netbeans runs

JavaNetbeans

Java 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:

  1. Open netbeans.conf file available under etc folder inside the NetBeans installation.
  2. Modify the netbeans_jdkhome variable to point to new JDK path, and then
  3. 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

Solution 7 - Java

For anyone on Mac OS X, you can find 1.netbeans.conf 2.jdk home.

here:enter image description here

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionrgksuganView Question on Stackoverflow
Solution 1 - JavaAbdel Raoof OlakaraView Answer on Stackoverflow
Solution 2 - JavaPaulo CarvalhoView Answer on Stackoverflow
Solution 3 - JavashousperView Answer on Stackoverflow
Solution 4 - JavaMohamad AlhamoudView Answer on Stackoverflow
Solution 5 - JavadotbitView Answer on Stackoverflow
Solution 6 - JavaJayLord AbuevaView Answer on Stackoverflow
Solution 7 - JavaTowfik AlrazihiView Answer on Stackoverflow