Netbeans crashes and won't start

8,493

Netbeans thinks it's supposed to use java 8.1 still you just need to reinstall it so it can see the correct java version

Share:
8,493

Related videos on Youtube

Alexey Ce
Author by

Alexey Ce

Updated on September 18, 2022

Comments

  • Alexey Ce
    Alexey Ce over 1 year

    Netbeans, javac and Java were all working fine until I installed Java 9. Now:

    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:~$ 
    

    Why is netbeans crashing? Tried removing and re-installing the IDE. Versions:

    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:~$ 
    

    I was using umake to handle netbeans; now trying from apt. Would like to use Java 9.

    • Tachyons
      Tachyons over 6 years
      use sudo, sudo apt-get install netbeans
    • Alexey Ce
      Alexey Ce over 6 years
      it's already installed, that's just to show the version number: 8.1.
  • Alexey Ce
    Alexey Ce over 6 years
    used apt to remove netbeans and re-install; same error. I think it's something like that. some sort of mismatch?
  • DanNightmare
    DanNightmare over 6 years
    try using apt-get purge netbeans as remove only removes binaries pretty much, and not the configuration files
  • Alexey Ce
    Alexey Ce over 6 years
    yes, purged and then re-installed with same result.
  • DanNightmare
    DanNightmare over 6 years
    If you're sure it uninstalled everything, than my solution wont work. What I would still try is apt-get install aptitude which is like apt-get but smarter for all I understand, and use it to purge aptitude purge netbeans. I'm not too sure about it fixing it though
  • DanNightmare
    DanNightmare over 6 years
    so I've just installed netbeans myself, through apt-get, and it is netbeans 8.1, not 9. that is the problem. 9 is the one that supports Java 9. but I don't find an installation for netbeans 9, although it was supposed to be released end of july 2017
  • Alexey Ce
    Alexey Ce over 6 years
    huh. mystery deepens. I'll take a further look into version numbers. preferably woul use umake for all this. thx for diligence.