本文介绍了找不到java.请使用 --jdkhome 开关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我刚刚在 CentOS 6.5 上安装了 Netbeans 8.0.2.
I have just installed Netbeans 8.0.2 on CentOS 6.5.
当我尝试运行它时,我收到消息
When I try to run it, I get the message
Cannot find java. Please use the --jdkhome switch
我有/usr/share/java-1.7.0 所以我输入了
I have /usr/share/java-1.7.0 so I typed
/usr/local/netbeans-8.0.2/bin/netbeans --jdkhome /usr/share/java-1.7.0
仍然得到
Cannot find java. Please use the --jdkhome switch
我还有/root/Downloads/jdk1.8.0_40 允许我安装 Netbeans.但是,当我输入
I also have /root/Downloads/jdk1.8.0_40 which allowed me to install Netbeans. However, when I type
/usr/local/netbeans-8.0.2/bin/netbeans --jdkhome /root/Downloads/jdk1.8.0_40
我还是明白了
Cannot find java. Please use the --jdkhome switch
我试过了
whereis java
得到
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
不过
/usr/local/netbeans-8.0.2/bin/netbeans --jdkhome /usr/bin/java
仍在生产
Cannot find java. Please use the --jdkhome switch.
推荐答案
我建议您在 netbeans.conf
配置文件中更改 NetBeans 使用的 JDK 配置:
I do recommend you to change the configuration of JDK used by NetBeans in netbeans.conf
config file:
netbeans_jdkhome="C:Program FilesJava..."
这篇关于找不到java.请使用 --jdkhome 开关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!