Netbeans: “not all requested modules can be enabled”

If you have installed Oracle Java 8 via default installers and you get the awkward message “not all requested modules can be enabled” in your Linux box when trying to create a new project in Netbeans you should configure netbeans to use the proper JDK.

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
    1. set netbeans_jdkhome variable to point to the proper location, eg:
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"

 

 

References:

https://askubuntu.com/questions/750514/netbeans-not-all-requested-modules-can-be-enabled

 

Advertisements

3 thoughts on “Netbeans: “not all requested modules can be enabled””

Comments are closed.