How to Install Netbeans on Ubuntu 22.04?

Netbeans is an open-source and free IDE for Java application development such as android apps and websites. Netbeans support is available on various platforms, including Windows, macOS, and Linux.

This post will demonstrate the possible methods to install Netbeans on Ubuntu 22.04. The content for the post is:

Method 1: Install Netbeans Using Debian Package

The first method to install the NetBeans is using the Debian package. The installation method through the Debian package is described in the below steps.

Step 1: Download the .deb File

For downloading the Debian package “wget” command can be used:

$ wget https://github.com/codelerity/netbeans-installers/releases/download/v16-build1/apache-netbeans_16-1_amd64.deb

Once the file is downloaded, it will appear in the “home” directory, which can be seen using the “ls” command:

$ ls

Step 2: Install the Debian Package

Now, install the Debian package using the following command:

$ sudo apt install '/home/itslinuxfoss/apache-netbeans_16-1_amd64.deb'

After executing the above command, apache Netbeans will be installed in the operating system.

To run it, just type “netbeans” in the terminal which will open the interface of the Netbeans:

Remove Netbeans

To remove the Netbeans installed through the Debian package is obtained as follows:

$ sudo apt autoremove --purge apache-netbeans

The Netbeans has successfully been removed from the operating system.

Let’s move towards method 2 to install Netbeans.

Note: Before installing Netbeans through the snap (Method 2) and flatpak package (Method 3), make sure you have java JDK installed in your system to use Netbeans. You can check our article about the Installation of Java on Ubuntu 22.04.

Method 2: Install Netbeans Using Snap Package

The snap package support for Netbeans is also available, and users can install Netbeans through the snap package using both CLI and GUI methods. Let’s discuss both ways to install Netbeans.

Method 2.1: Using CLI

Netbeans snap package can be installed using the terminal. To do so, execute the given command:

$ sudo snap install netbeans --classic

The Netbeans has been installed.

Method 2.2: Using GUI

To install Netbeans using the graphical user interface, open the ubuntu software center. Click on the search button, type “Netbeans”, and click on “Apache Netbeans”, as shown in the below image:

After that, install the Netbeans by clicking on the “install” button:

The installation will require user authentication:

Once you authenticate the password, the installation will begin and be installed in the operating system.

To check it, search the Netbeans in the applications:

The Netbeans has been successfully installed.

Remove Netbeans Snap Package

To remove the Netbeans snap packages, run the given command in the terminal:

$ sudo snap remove netbeans

This command will remove the Netbeans snap package.

Method 3: Install Netbeans Using Snap flatpak

Another method to install Netbeans is using the flatpack package. flatpack is the Linux distribution framework used to install various applications. This is not a pre-defined package in Linux but can be installed using the “apt install” command:

$ sudo apt install flatpak

After installing the package, add the flathub (where all the applications are placed) using the command:

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Once you add flathub, install the Netbeans using the following command:

$ flatpak install flathub org.apache.netbeans

Netbeans is successfully installed through flatpak packages.

Remove Netbeans flatpak Package

To remove Netbeans through flatpack packages; the following command is used:

$ flatpak uninstall --delete-data flathub org.apache.netbeans

The Netbeans flatpak package is removed.

Conclusion

In Ubuntu 22.04, Netbeans can be installed using Debian, snap, and flatpak packages. The Debian package is available on the official website of the Netbeans, while the snap and flatpak packages are obtained from Ubuntu’s snap and flatpak support. This post has illustrated all the possible methods to install Netbeans on Ubuntu 22.04.