Netbeans 崩溃并且无法启动

Netbeans 崩溃并且无法启动

在我安装 Java 9 之前,Netbeans、javac 和 Java 都运行良好。现在:

thufir@doge:~$ 
thufir@doge:~$ sudo update-java-alternatives --list
java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64
java-8-oracle                  1081       /usr/lib/jvm/java-8-oracle
java-9-oracle                  1091       /usr/lib/jvm/java-9-oracle
thufir@doge:~$ 
thufir@doge:~$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-9-oracle/bin/java              1091      auto mode
  1            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
* 2            /usr/lib/jvm/java-8-oracle/jre/bin/java          1081      manual mode
  3            /usr/lib/jvm/java-9-oracle/bin/java              1091      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
thufir@doge:~$ 
thufir@doge:~$ 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
thufir@doge:~$ 

为什么 Netbeans 会崩溃?尝试删除并重新安装 IDE。版本:

thufir@doge:~$ 
thufir@doge:~$ apt-get -s install netbeans
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Also keep in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree       
Reading state information... Done
netbeans is already the newest version (8.1+dfsg2-3).
The following packages were automatically installed and are no longer required:
  libkf5gpgmepp-pthread5 libkf5qgpgme5 libmimetic0
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 699 not upgraded.
thufir@doge:~$ 
thufir@doge:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"
thufir@doge:~$ 

我过去用umake它来处理 netbeans;现在尝试从 apt 中处理。想使用 Java 9。

答案1

Netbeans 认为它​​应该使用 Java 8.1,但你仍然需要重新安装它,这样它才能看到正确的 Java 版本

相关内容