Ubuntu: Netbeans cannot find java



Question:

So, I uninstalled Openjdk 7 and installed Oracle Java from webupd8. But after the installation Netbeans won't start. I have tried all the methods posted online about editing the netbeans.conf file and entering the path `

/usr/lib/jvm/java-8-oracle/jre/bin/java

or

/usr/lib/jvm/java-8-oracle/bin/javac  

I even entered the path from terminal typing ./netbeans --jdkhome=""

Any help is greatly aprreciated. Thank you!


Solution:1

The option for setting the jdkhome is not --jdkhome="". There should be a space rather than an equals sign between --jdkhome and the path.

eg.

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

If you get it wrong, such as:

netbeans  --jdkhome "/wrong/"  

the error message you can see when starting on the terminal should be:

Cannot find java. Please use the --jdkhome switch.  

If you are getting no error message or a different error message, the problem may not be with setting the JDK directory.

I would recommend you not try to run the Netbeans version which is in the Ubuntu repositories (7.0.1 for Ubuntu 14.04) and instead get 8.0.2 from netbeans.org or the version bundled with the JDK on Oracle's website.

When I run Netbeans 7.0.1 with JDK 1.8 it shows the splash and crashes.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »