I never used Ubuntu in my life before, and now I've installed Ubuntu 18.04 lts. I have problem with NetBeans. Although I have JDK and the rest that needs, I get this:


I can't open or start a project,nothing happens when I click. What should I do to fix this?

  • 1
    What's your java version? – Kulfy Jun 24 '18 at 19:29
  • @Kulfy Java 8, well, I meant nothing happens, nothing opens – Nicole Jun 24 '18 at 19:35

Installing Netbeans 9.0:

  • Building from Source:

    1. Download the source zip from here and extract. Or open terminal and clone the repositories from GitHub using

      git clone https://github.com/apache/incubator-netbeans
    2. Install either Oracle JDK or OpenJDK.

      • For Oracle JDK: Download JDK8 from here and run these commands:

        sudo su
        mkdir /opt/jdk
        tar -zxf jdk-8u181-linux-x64.tar.gz -C /opt/jdk
        update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_181/bin/java 100
        update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_181/bin/java 100
      • For OpenJDK, run

        sudo apt install openjdk-8-jdk
        sudo apt install openjdk-8-jre
    3. Install Apache ANT: For installing Apache Ant v1.10.3, run

      sudo apt install ant
    4. Once you’re all set just enter the incubator-netbeans directory and type ant to build the Apache NetBeans IDE.

    5. Once built, the IDE bits are placed in the ./nbbuild/netbeans directory. You can run the IDE from within the incubator-netbeans directory by typing ./nbbuild/netbeans/bin/netbeans or use ant tryme to run the Apache NetBeans IDE.

  • Installing from Binaries: Download the binary zip from here. Unpack the zip and run netbeans in bin folder using ./netbeans. I'll suggest to make a desktop entry a.k.a. menu shortcut. For details about it read this and this.

For natively installing Netbeans v8.2, See Karel's answer.

Original Answer:

Java seems to be quite broken currently under 18.04. This can create problems with Netbeans as well as Eclipse. So, I'll suggest not to install Java from Ubuntu's repository.

If you want JDK as well as Netbeans first of all remove Java completely from your system. Then download NB+JDK from here.

I assume that downloaded files go to Downloads and downloaded file name is jdk-8u111-nb-8_2-linux-x64.sh. Use below commands to install Netbeans and JDK 1.8.

  • Navigate to the folder(Downloads) containing file using

    cd ~/Downloads
  • Make file executable(if already not) using

    chmod +x jdk-8u111-nb-8_2-linux-x64.sh
  • Finally run it using

  • Follow on screen instructions to complete installation.

  • The link NetBeans + JDK Bundle in your answer is obsolete, and it has been updated to this new link: netbeans.apache.org. A lot of stuff has changed. NetBeans has been updated to version 9.0 and it isn't bundled with JDK anymore. It's probably worthwhile updating this answer in order to get a source at Ask Ubuntu for information about how to install NetBeans 9.0. Alternatively I've already solved the problem of how to install NetBeans 8.2 natively in Ubuntu 18.04: askubuntu.com/questions/1045090/…. – karel Sep 18 '18 at 14:21
  • @karel Thank you for letting me know this. Highly appreciated. I have edited the answer, linked your answer, added details for 9.0. However, it took me around an hour to edit since I was verifying steps side by side. Also, there is still JDK+NB with JDK8u111. I have updated the link for the same. I think this is the least I can do for improving the answer. I request you to kindly go through the edited answer and let me know any other improvements I can make. Also, you can go ahead and edit it on your own if you find minor mistakes. This would be highly appreciated. – Kulfy Sep 18 '18 at 18:36
  • @karel In my opinion I should post a separate Q&A for How to install Netbeans 9.0. Let me know about your thoughts. Thanks. :) – Kulfy Sep 18 '18 at 18:38
  • That's a good idea. – karel Sep 18 '18 at 18:45
  • @karel Actually I am afraid of getting it marked as duplicate of this. And the accepted answer is too old I guess. – Kulfy Sep 18 '18 at 18:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.