netbeans installation error: can't initialize ui running in headless mode

后端 未结 6 1259
无人共我
无人共我 2021-01-18 00:21

I\'m trying to install NetBeans on Linux Mint, and I\'m getting the following error every time I run the installation script:

Configuring the installer... Searching

相关标签:
6条回答
  • 2021-01-18 00:48

    Looks like Netbeans does not work properly with Openjdk. This is what I did (in Linux Mint 12):

    sudo apt-get remove openjdk*
    sudo apt-get install sun-java6-jdk
    

    Then you will be able to run the .sh installer as usual.

    0 讨论(0)
  • 2021-01-18 01:00
    1. Change the priority of the Oracle Java executables:

      export PATH=/usr/java/latest/bin:$PATH

    2. Run the installer:

      ./netbeans-8.1-linux.sh

    0 讨论(0)
  • 2021-01-18 01:02

    In case anyone has this problem in the future, Netbeans doesn't like OpenJDK 6 but -- fortunately -- it works fine with OpenJDK 7 (as expected as for Java 7 OpenJDK is the reference implementation). Just make sure you remove any Java 6 packages before installation attempts. On Ubuntu and Mint one can do:

    sudo apt-get purge ^openjdk-6-*
    sudo apt-get install openjdk-7-jdk
    

    It should work afterwards.

    0 讨论(0)
  • 2021-01-18 01:04

    I hit this same issue on Kubuntu 12.04 LTS but needed Sun JDK 6 for a project I'm maintaining. I stumbled upon Martin Wimpress' OAB-Java script (by way of help.ubuntu.com) which creates and installs a local apt repository for Sun JDK 6. You can find the latest instructions on Martin's github site which run as follows:

    cd ~/
    wget https://github.com/flexiondotorg/oab-java6/raw/0.2.7/oab-java.sh \
    -O oab-java.sh
    chmod +x oab-java.sh
    sudo ./oab-java.sh
    

    If you want to see what this script is doing while it is running then execute the following from another shell:

    tail -f ./oab-java.sh.log
    

    Alternatively, you can clone the OAB-Java repo and kick of the script from within it:

    git clone git://github.com/flexiondotorg/oab-java6.git
    cd oab-java6
    sudo ./oab-java.sh
    

    Either way, once that is in place follow Jose's instructions to remove openjdk and install sun jdk:

    sudo apt-get remove openjdk*
    sudo apt-get install sun-java6-jdk
    


    One final note, the script accepts a -7 argument which will create and install a local apt repository for Oracle JDK 7 should you want to go that route.

    0 讨论(0)
  • 2021-01-18 01:04

    I was able to get it to work by getting into the target system using ssh -X, then making sure DISPLAY was exported. That handles the X server issues.

    0 讨论(0)
  • 2021-01-18 01:05

    What worked for me was installing default java environment from the terminal:

    sudo apt-get install default-jre
    
    0 讨论(0)
提交回复
热议问题