I know this question has already been posted, but the solutions provided don't work for me. I added the webupd8team/java repository and installed oracle-java8-installer and oracle-java8-set-default. I downloaded netbeans 8.1 from netbeans.org (full version), installed it but when it comes to enabling the java modules it fails, showing me a list of all the modules netbeans can't enable.

I also ran sudo update-alternatives --config java, which outputs

  0            /usr/lib/jvm/java-8-oracle/jre/bin/java   1         auto mode
* 1            /usr/lib/jvm/java-8-oracle/jre/bin/java   1         manual mode

JDK seems to be missing.

I get the correct output when I run both java -version and javac -version

I also tried to run the command netbeans --jdkhome /usr/lib/jvm/java-8-oracle, unsuccessfully. I get an error message saying netbeans is not installed.

Now, all this only happens with the version I download from the website. When I install netbeans from the shell (sudo apt-get install netbeans) everything works just fine.

The thing is I need the full version from the website, because I'm working with HTML5, CSS, J2EE and GlassFish server support.

All help is appreciated.


Go to /etc and open netbeans.conf.

Note: you can find netbeans_root_folder with ls -l $(which netbeans)

Make sure the variable netbeans_jdkhome has the correct value, something like:

  • +1 Or /usr/local/java/java-8-oracle – Zon Jul 27 '17 at 19:03
  • 2
    and for openJdk => netbeans_jdkhome="/usr/lib/jvm/java-8-openjdk-amd64/" – ArMo 372 Apr 9 '18 at 18:44
  • Where's the "netbeans root folder/etc"? – fedd Jun 23 '18 at 17:52
  • 1
    @fedd for root folder ls -l $(which netbeans) will give you this answer something like /usr/local/netbeans-8.2/ can be... – Philippe Gachoud Jul 5 '18 at 20:20

Either edit /usr/local/netbeans-X.Y/etc/netbeans.conf to contain


Or use the command:

/usr/local/netbeans-X.Y/bin/netbeans --jdkhome /usr/lib/jvm/java

edit /usr/local/netbeans-X.Y/etc/netbeans.conf file

  • I don't understand what is this supposed to mean. What are you reader supposed to do with the fragment netbeans_jdkhome="/usr/lib/jvm/java-8-openjdk-amd64"? Could you please edit your post to explain? Thanks. – David Foerster Feb 23 '18 at 0:36

Uninstall and install with selected JVM


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.