How do I install Netbeans 9.0+?

There are basically 3 ways to install Apache Netbeans incubating as described below:

  • Installing using ubuntu-make:

    Apache Netbeans (incubating) is now available via ubuntu-make. As they say, latest version, You can now install Netbeans 11.0 using ubuntu-make. For that, run:

    sudo add-apt-repository ppa:lyzardking/ubuntu-make
    sudo apt-get install ubuntu-make
    umake ide netbeans
    
  • Installing from Binaries:

    • For NetBeans 9.0: Download the binary zip for NetBeans 9.0 from the direct download link.

    • For NetBeans 10.0: Download the binary zip for NetBeans 10.0 from Apache Download Mirrors

    • For NetBeans 11.0: Download the binary zip for NetBeans 11.0 from Apache Download Mirrors

      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 How can I create launchers on my desktop? - Ask Ubuntu.

  • Building from Source:

    Note: According to Apache NetBeans' release notes (which can be found on Releases / Apache NetBeans under corresponding release) NetBeans 9.0 is compatible with JDK 8, 9 and 10, NetBeans 10.0 with JDK 8, 9, 10 and 11 and NetBeans 11.0 with JDK 8, 9, 10, 11 and 12. Building NetBeans with an incompatible JDK might cause build errors. Moreover JDK 9 and 10 were non-LTS version of Java which seems to be obsolete as of now and are no longer available in Ubuntu's official repository. The installation process of both is described below.

    1. Download the source zip for:

      • NetBeans 9.0 from the direct download link

      • NetBeans 10.0 from Apache Download Mirrors

      • NetBeans 11.0 from Apache Download Mirrors
    2. Install either Oracle JDK or OpenJDK.

      • For Oracle JDK8: 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 OpenJDK8, run

        sudo apt install openjdk-8-jdk
        sudo apt install openjdk-8-jre
        
      • For OpenJDK11, run

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

      sudo apt install ant
      
    4. Once you’re all set just extract the downloaded source, 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.


Apache NetBeans (incubating) snap package can be installed from Ubuntu Software Center directly. The latest version is 11.0.


NetBeans has been updated and NetBeans 10.0 can now be installed directly from the default Ubuntu repositories in Ubuntu 18.04 and later. To install it open the terminal and type:

sudo apt install netbeans  

This is the most convenient way to install NetBeans because there are also several NetBeans support libraries in the default Ubuntu repositories. You can list these packages with the following command:

apt search netbeans

The NetBeans version that I prefer in 18.04 however is the netbeans snap package which can be installed in all currently supported versions of Ubuntu with the following command:

sudo snap install netbeans --classic

This command installs NetBeans 11.

Tags:

Java

Netbeans