java – Netbeans没有在新的Ubuntu 18.04安装上启动

在新的Ubuntu 18.04安装和之后的netbeans安装之后,netbeans无法启动. netbeans安装了

sudo apt install netbeans

其他一些java程序(至少是Eclipse)也没有启动.

从命令行启动netbeans时,JVM会打印以下警告:

➜  ~ 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
➜  ~ 

解决方法:

Ubuntu的存储库仍然有Netbeans 8.1但JDK 11.所以我从Netbeans Website下载了Netbeans 8.2

下载Netbeans 8.2后,请按照下列步骤操作:

sudo apt autoremove netbeans
cd Downloads
sudo chmod +x netbeans-8.2-linux.sh
./netbeans-8.2-linux.sh

并按照屏幕说明操作.导入设置并从应用程序抽屉启动netbeans.

此外,如果您有任何名为JDK 8的包,只需将其删除即可.您可以使用找到安装的软件包

sudo apt list --installed

并删除名称为openjdk-8-的所有包,使用,

sudo apt autoremove <package_name>

有关Netbeans 9.0的安装,请参阅here.

上一篇:java – Netbeans 8.0.2在Ubuntu 15.10 64bit启动时冻结


下一篇:java – netbeans并非所有请求的模块都可以启用