3

I've installed Netbeans in Ubuntu LTS 16.04, but I'm getting a "Not all requested modules can be enabled" error at the "Finding Feature" stage (see below).

enter image description here

Following netbeans not all requested modules can be enabled, I've tried to go to the /etc directory and find netbeans.conf, but I found no such file (see below).

enter image description here

What could be the issue here?

Kurt Peek
  • 409

2 Answers2

3

This problem mostly happens when you use default settings while installing NetBeans. As a result, file netbeans.conf has incorrect location of JAVA_HOME. This issue can be easily resolved when we provide correct path for the location of JAVA_HOME.

  1. To find location of JAVA_HOME on your system open terminal by pressing Ctrl+Alt+T. Then in terminal type following command.

    env | grep JAVA_HOME

Output will be something like this JAVA_HOME=/usr/lib/jvm/java-8-oracle. Here /usr/lib/jvm/java-8-oracle is location of JAVA_HOME.

  1. Now, find the location of netbeans.conf. For this execute following command in terminal.

    sudo find / -name netbeans.conf

After this enter your password. Output will be something like /home/username/NetBeans/netbeans-8.2/etc/netbeans.conf. Exit from current running command by pressing Ctrl+C.

  1. Copy the output from terminal using Ctrl+Shift+C and execute following command using the code you copied.

    sudo gedit /home/username/NetBeans/netbeans-8.2/etc/netbeans.conf

In your case replace /home/username/NetBeans/netbeans-8.2/etc/netbeans.conf with the code you just copied by using Ctrl+Shift+V.

  1. Above command will open the code in gedit. Press Ctrl+F to use find in gedit and search for netbeans_jdkhome=". This holds the location of JAVA_HOME. Replace everything after netbeans_jdkhome=" with the location of JAVA_HOME found in step 1 above. Save and exit from the file.

  2. Restart NetBeans and now try to make new project. If still it doesn't work, restart your system and try again.

Priyansh
  • 1,051
0

Locate your netbeans root folder, open the /etc directory, and edit netbeans.conf. Or from your '/usr' directory, search for netbeans.conf. Mine is in /usr/local/netbeans-8.2/etc.

Look for a line that says netbeans_jdkhome= and put in your jdk home folder /usr/local/java/jdk1.8.0_131 so it looks like this:

netbeans_jdkhome="/usr/local/java/jdk1.8.0_131"

If you cannot edit your netbeans.conf, use the following command to open and edit it:

cd /path/to/netbeans.conf
sudo nano netbeans.conf

When you are done editing, press ctrl+x to exit, press y to save, then press enter to confirm.

Zanna
  • 70,465
Beulah
  • 164