Install NetBeans IDE on Debian 11
Step through this guide to learn how to install NetBeans IDE on Debian 11.
Install Java Development Kit on Debian 11
In order to run NetBeans IDE, you need to have installed Java Development Kit version 8 or above. In this guide, we use Java 11, which is the default available version on Debian 11 main repos.
apt install default-jdk
To verify the version of the installed Java development kit, run the command below;
openjdk version "11.0.14" 2022-01-18 OpenJDK Runtime Environment (build 11.0.14+9-post-Debian-1deb11u1) OpenJDK 64-Bit Server VM (build 11.0.14+9-post-Debian-1deb11u1, mixed mode, sharing)
Installing NetBeans IDE on Debian
There are different methods in which you can install NetBeans IDE on Debian. These include;
Install NetBeans on Debian using NetBeans installer script
NetBeans provides a script that makes it installation easier. Navigate to Apache NetBeans downloads page and grab the installer script for Linux. You can simply run the command below to download it (for version 12.6).
apt install wget -y
Once download, run the installation script as non root user with sudo rights it as follows;
sudo sh Apache-NetBeans-12.6-bin-linux-x64.sh
The script will launch the NetBeans installation wizard. Note that you need to be non-root user with sudo to run the script, otherwise you may get such an error;
No X11 DISPLAY variable was set, but this program performed an operation which requires it. Exception: java.awt.HeadlessException thrown from the UncaughtExceptionHandler in thread "main"
When the installer runs;
- If you want, you can customize your installation, otherwise, click Next to proceed.
- Accept the EULA and proceed.
- Choose the installation path for your NetBeans application. Otherwise, click next to accept the default.
- Once the installation is done, click Finish to close the installation wizard.
- NetBeans IDE should now be installed on your Debian 11 system.
Install NetBeans from Snap on Debian 11
If you need to get the latest version of NetBeans installed and running on Debian 11, you can install it from snaps using the snap package manager.
On Debian 11, Snapd is not installed by default, hence run the command below to install it.
sudo apt install snapd -y
Once that is done, you need to install the
core snap in order to get the latest
But before you can install core snap, Log out of your system and re-login or simply reboot;
Once you re-login to your system, then install core snap.
sudo snap install core
Check the available version of NetBeans provided by the Snap repos;
snap info netbeans
Well, as you can see, it got the latest version of NetBeans which you can then install using snap package manager;
sudo snap install netbeans --classic
Running NetBeans on Debian 11
In all the methods, once the installation is done, NetBeans should now be available among your system applications.
You can just launch and start using it.
Read more on NetBeans IDE Knowledge base.
Uninstall NetBeans IDE on Debian
If you ever want to remove or uninstall NetBeans IDE on Debian systems installed using this method, navigate to the NetBeans install directory and execute the uninstall script.
Similarly, run the uninstall script as non root user with sudo provileges;
If you installed using SNAP, then remove using the command below;
sudo snap remove netbeans
And that brings us to the end of our simple tutorial on how to install NetBeans IDE on Debian 11.