启动时 网豆从终端,收到以下错误。
rishabh@rishabh-HP-Notebook:~$ netbeans
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/opt/netbeans/platform/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
答案1
当我尝试将 Netbeans 8.1 与 Java 9 一起使用时,我遇到了同样的问题。如果java -version
说 1.9,你可以降级到 1.8,如下所示:
# Install Java 8 if you don't already have it.
sudo apt install openjdk-8-jdk
# Switch to Java 8
sudo update-alternatives --config java
# Attempt to run Netbeans again.
netbeans