Netbeans installation error: unable to initialize ui in silent mode

I try to install NetBeans on a Linux Mint, and every time I run the installation script:

I get the following error:

Configuring the installer ... Finding the JVM in the system ... Retrieving installation data ... Starting the installation wizard ... Unable to initialize the user interface Working in headless mode

What should I do to make it work?

+8
installation netbeans
source share
6 answers

Netbeans doesn't seem to work properly with Openjdk. This is what I did (on Linux Mint 12):

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

Then you can run the .sh installer as usual.

+9
source share

In case someone has this problem in the future, Netbeans do not like OpenJDK 6, but, fortunately, it works fine with OpenJDK 7 (as expected, for Java 7 OpenJDK is a reference implementation). Before installing, make sure you uninstall the Java 6 packages. On Ubuntu and Mint, you can do:

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

After that, it should work.

+13
source share

I got the same issue on Kubuntu 12.04 LTS, but I need Sun JDK 6 for a project that I support. I came across an OAB-Java Martin Wimpress script (via help.ubuntu.com ) that creates and installs a local repository for Sun JDK 6. You can find the latest instructions on the Martin github site, which runs 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 does during its execution, follow these steps from another shell:

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

Alternatively, you can clone the OAB-Java repository and delete the script from the inside:

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

In any case, as soon as this happens, follow Jose's instructions to remove openjdk and install sun jdk:

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


In the latter case, the script accepts the -7 argument, which will create and install the local apt repository for Oracle JDK 7 if you want to go this route.

+2
source share

I managed to get it working by hitting the target system using ssh -X, then making sure that DISPLAY was exported. This fixes problems with the X server.

+1
source share

For me, installing the default java environment from the terminal worked:

 sudo apt-get install default-jre 
0
source share
  • Change the priority of Oracle Java executables:

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

  • Run the installer:

    ./netbeans-8.1-linux.sh

0
source share

All Articles