Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi, im new at ubuntu and i want to use netbeans. I downloaded netbeans from its web site then I wrote this commands to the line

hakki@hakki-K55VM:~/Downloads$ chmod +x netbeans-7.4-linux.sh

hakki@hakki-K55VM:~/Downloads$ sudo bash netbeans-7.4-linux.sh

[sudo] password for hakki:

Configuring the installer... Searching for JVM on the system... Java SE Development Kit (JDK) was not found on this computer JDK 7 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again. You can specify valid JDK location using --javahome installer argument.

To download the JDK, visit http://www.oracle.com/technetwork/java/javase/downloads

After I get above notification I tried to install JDK with these commands

hakki@hakki-K55VM:~$ sudo apt-get install openjdk-7-jre-headless .... ....




then I controled jdk installed properly and it returned below lines

hakki@hakki-K55VM:~$ java -version

java version "1.7.0_51" OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.13.10.1) OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

After I download jdk I tried to install netbeans again but still it returns error and it cant initialize UI. How can I solve this problem?

hakki@hakki-K55VM:~/Downloads$ sudo bash netbeans-7.4-linux.sh

Configuring the installer... Searching for JVM on the system... Extracting installation data... Running the installer wizard... Can`t initialize UI Running in headless mode

Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler i

share|improve this question
@wojox Please post that as an answer. It is the answer. –  zwets Mar 1 at 21:03
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.