缺少 JDK,需要运行某些 NetBeans 模块 [英] The JDK is missing and is required to run some NetBeans modules

查看:26
本文介绍了缺少 JDK,需要运行某些 NetBeans 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完整的错误信息:缺少 JDK,需要运行某些 NetBeans 模块请使用 --jdkhome 命令行选项指定 JDK 安装或查看 http://wiki.netbeans.org/FaqRunningOnJre更多信息.

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.

一些细节:我第一次在 Linux mint 上安装了 Netbeans,当我在打开模块时启动它时会出现此错误消息.但是我确实安装了jdk.

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

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 -version

javac 1.8.0_66

推荐答案

找到文件[netbeans安装目录]/etc/netbeans.conf

幸运的是,Linux 有一个 find 助手,比如find/home/-name "netbeans.conf,您可以在其中将 /home/ 更改为要搜索的位置.

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.

我在 /usr/local/netbeans-8.1/etc/netbeans.conf

一旦找到该文件,就需要设置以下属性:

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

netbeans_jdkhome="[jdk_path]"

在哪里可以找到 jdk_path 使用:

where you can find the jdk_path using:

update-alternatives --config java

就我而言,我在 /opt/java/jdk1.8.0_191

这篇关于缺少 JDK,需要运行某些 NetBeans 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆