Ubuntu – netbeans not all requested modules can be enabled

javajdknetbeans

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.

Best Answer

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:

netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
Related Question