Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In NetBeans how do I change the Default JDK? [duplicate]

Possible Duplicate:
Changing Java platform on which Netbeans runs

Here is an image of my default JDK (which is 1.6) and the JDK I want to set as default (which is 1.7)

http://tinypic.com/view.php?pic=35ldlye&s=5

like image 809
Hrfpkj Avatar asked Apr 13 '12 19:04

Hrfpkj


People also ask

How do I change the default Java platform in NetBeans 12?

If you installed another JDK on your machine and want to choose that for projects, inside Netbeans go to Tools/Java Platforms. Add your new installation. Then when you go to some project's properties, look at the Build/compile settings. Choose your new java platform, and it will be used for your project.

How use different Java version in NetBeans?

If you have a project open, you can go to file -> project properties. At the bottom of the window you'll find a menu labeled source/binary format. You should be able to select the jdk version there.

How do I change the default JDK version in NetBeans?

You need to set the available JDKs via the Java Platforms dialog. Then, go to Run → Set Project Configuration → Customize . After that, in the opened dialog box, go to menu Build → Compile. Set the version. For those not using Windows, the file to change is netbeans-8.0/etc/netbeans.conf. Comment out the old value and insert the new value.

What version of Java do I need to install before NetBeans?

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. Show activity on this post.

Where does NetBeans IDE store the JDK?

You know, by default, NetBeans IDE sticks with the JDK it found at the time of installation, by storing the path to JDK home in a configuration file called netbeans.conf. You can find this file under NetBeans installation directory > netbeans > etc directory.

How do I change the Java source compiler in NetBeans?

Where you already have a project in NetBeans and you wish to change the compiler (e.g. from 1.7 to 1.) then you would need to also change the Java source compiler for that project. Right-click on the project and choose Properties as outlined below:


1 Answers

If I remember correctly, you'll need to set the netbeans_jdkhome property in your netbeans config file. Should be in your etc/netbeans.conf file.

like image 76
Michael Avatar answered Sep 24 '22 09:09

Michael