I have been usigng NetBeans 2 years now and have encountered an issue. After a normal apt-get upgrade NetBeans stopped working altogether. After this I reinstall the JRE and JDK to no avail. However, after reinstalling NetBeans it would open but with the following error:

The JDK is missing and is required to run some NetBeans modules Please use the --jdkhome command line option to specify a JDK installation or see http://wiki.netbeans.org/FaqRunningOnJre for more information.

After reading though the post I discover/usr/local/share/java/ does not exist. Is there any way to restore the files and if not how may I resolve the issue?

I have tried the solution suggested in this post, it has no effect other than a different error message for one project.

Not all requested modules can be enabled: [StandardModule:org.netbeans.modules.j2ee.persistence.kit jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-j2ee-persistence-kit.jar, StandardModule:org.netbeans.modules.maven.kit jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-maven-kit.jar, StandardModule:org.netbeans.modules.debugger.jpda.kit jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-debugger-jpda-kit.jar, StandardModule:org.netbeans.modules.hibernate jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-hibernate.jar, StandardModule:org.netbeans.modules.java.kit jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-java-kit.jar, StandardModule:org.netbeans.modules.form.kit jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-form-kit.jar, StandardModule:org.netbeans.modules.spring.beans jarFile: /home/MY_HOME/netbeans-8.1/java/modules/org-netbeans-modules-spring-beans.jar]
  • How did you install the JDK? – A.B. Nov 16 '15 at 7:09
  • I used this tutorial when I first started with Ubuntu. All has been working fine up until recently. – Blunderchips Nov 16 '15 at 7:17
  • What's the output of sudo update-alternatives --config java – A.B. Nov 16 '15 at 7:19
  • There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-oracle/jre/bin/java Nothing to configure. – Blunderchips Nov 16 '15 at 7:21
  • You have only a JRE installed. Use this answer: askubuntu.com/a/640945/367165 to install the JDK – A.B. Nov 16 '15 at 7:25

First, you have to install a JDK, because you said in your comments:

There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-oracle/jre/bin/java Nothing to configure.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Now you have to configure Netbeans to use this JDK or run Netbeans with

netbeans --jdkhome /usr/lib/jvm/java-8-oracle

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.