How to set Sun’s java platform as the default java platform in Netbeans

I realized that in Netbeans the default Java platform for the projects was not the Sun’s and it was not possible to change this setting by using some features of NetBeans, but I had to manually edit a configuration file.

Requirements:

  • Ubuntu 11.04
  • Netbeans 6.9
  • Sun Java 1.6

 

    1. Open Netbeans, and go to Tools-> Java Platforms and add Sun Java 1.6 selecting the folder /usr/lib/jvm/java-6-sun, but you can ‘t select the default platform

 

    1. Edit the file /etc/netbeans.conf with root privileges, for example with the console command sudo gedit /etc/netbeans.conf and enter the following line: netbeans_jdkhome = “/usr/lib/jvm/java-6-sun”

 

    1. Finally the java platform dialog box should be like ..

 


Comments

One response to “How to set Sun’s java platform as the default java platform in Netbeans”

  1. Thanks a lot for your message! It helped me change the default java plarform in NB.8.0.2. Best Regards, Alexey.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.