Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
659 views
in Technique[技术] by (71.8m points)

java - The JDK is missing and is required to run some NetBeans modules

Complete error message: 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.

Some details: I just installed Netbeans on Linux mint for the first time and when I start it when its turning on modules this error message appears. But I do have jdk installed.

$ java -version

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

$ javac -version

javac 1.8.0_66
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Find the file [netbeans installation directory]/etc/netbeans.conf

Luckily, Linux has a find helper like find /home/ -name "netbeans.conf, in which you can change the /home/ to a location where you want to search.

I found it at /usr/local/netbeans-8.1/etc/netbeans.conf

Once, you found the file, the following property needs to be set:

netbeans_jdkhome="[jdk_path]"

where you can find the jdk_path using:

update-alternatives --config java

In my case, I found it at /opt/java/jdk1.8.0_191


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...