How to install latest netbeans

First, you should install Java. As a general thumb of rule, the JDK 1.8 version is the most used and the most stable JDK you could use. Read more at quora about this.

0) Install Java

Install the Java version you need

1) Download and extract latest Netbeans

Download latest netbeans from the official site. Create a directory named opt in your home directory and extract the archive you downloaded to that directory

2) Setup the JDK path

Unfortunately you have to manually configure the directory of the JDK that Netbeans will use. To find the path of the installed JDKs you can type:

$ update-java-alternatives -l

A sample output would be:

java-7-oracle 1078 /usr/lib/jvm/java-7-oracle
java-8-oracle 1081 /usr/lib/jvm/java-8-oracle

What you have to do is locate the file netbeans.conf and set the netbeans_jdkhome variable to one of the paths displayed above.

The easiest way to find netbeans.conf is to run the following command:

find / -name netbeans.conf 2> /dev/null

This may take a while since it will search the whole disk.

You could also look at the following standard directories:

  • /home/netbeans-X.Y/etc/netbeans.conf
  • /usr/local/netbeans-X.Y/etc/netbeans.conf

After you have found netbeans.conf, you perform the following steps:

  1. open netbeans.conf with any text editor you like
  2. set netbeans_jdkhome variable to point to the proper location, eg:
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"

Leave a Reply