Netbeans在ubuntu 18中未打开

时间:2018-09-10 14:31:31

标签: java netbeans ubuntu-18.04

当我单击“ NetBeans”时,它没有打开……没有错误,没什么。

尝试在终端中运行“ netbeans”并出错

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/share/netbeans/platform18/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

尝试重新安装-首先删除

sudo apt-get purge netbeans

然后重新安装它:

sudo apt-get install netbeans

但这是相同的错误。

java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)

不确定如何解决此问题。非常感谢您的帮助。

1 个答案:

答案 0 :(得分:3)

Netbeans 8.2和更早版本不支持JDK10。有关详细信息,请参见https://stackoverflow.com/a/51599463/2796463。要使用Netbeans,您将需要安装JDK 8(openjdk-8-jdk)。

如果要继续将JDK 10用于其他软件,将JDK 8用于netbeans,则可以修改文件 /etc/netbeans.conf中的netbeans_jdkhome变量。在我的系统上,NetbeansRoot是/ usr / share / netbeans,但是我不知道在Ubuntu上是否相同。