A lot has been changed since the release of Netbeans 9.0. Now Netbeans is taken by Apache Foundation. Also, APT still has v8.1 in Bionic Beaver (18.04). So, how do I install latest version (>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
netbeansin bin folder using
./netbeans. I'll suggest to make a
desktop entrya.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.
Download the source zip for:
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
Install Apache ANT: For installing Apache Ant, run
sudo apt install ant
Once you’re all set just extract the downloaded source, enter the incubator-netbeans directory and type
antto build the Apache NetBeans IDE.
Once built, the IDE bits are placed in the
./nbbuild/netbeansdirectory. You can run the IDE from within the incubator-netbeans directory by typing
ant trymeto run the Apache NetBeans IDE.
Apache NetBeans (incubating) snap package can be installed from Ubuntu Software Center directly. The latest version is 11.0.