Installing Dependency Packages:
NetBeans is written on Java. So, you must have JDK installed on your computer in order to run NetBeans. You can use either Oracle JDK or OpenJDK. It’s up to you.
In this article, I am going to use OpenJDK as it is available in the official package repository of Debian 10. If you want to use Oracle JDK, check out the article Install JDK on Debian 10.
First, update the APT package repository cache with the following command:
The APT package repository cache should be updated.
Now, install OpenJDK from the official package repository of Debian 10 with the following command:
Now, press Y and then press <Enter> to confirm the installation.
APT will download and install all the required packages from the internet automatically.
At this point, OpenJDK should be installed.
NetBeans installation files comes in a ZIP compressed file. So, you must have unzip installed in order to decompress the file.
unzip is available in the official package repository of Debian 10. You can install unzip with the following command:
As you can see, unzip is already installed on my Debian 10 machine. If it is not the case for you, APT will automatically install it for you.
Now, visit the official website of NetBeans from your favorite web browser. Once the website loads, click on Download as marked in the screenshot below.
At the time of this writing, NetBeans 11 is the latest version available for download. NetBeans 11.0 LTS is the stable Long Term Release version and NetBeans 11.1 is the latest non LTS version. The non-LTS version has some new features but may have major bugs.
In this article, I am going to download and install the LTS version. But the procedure to install the non-LTS version is the same.
Now, scroll down a little bit and click on the Binaries download link as marked in the screenshot below.
Now, click on the generated link as marked in the screenshot below. The link may be different in your case. Don’t worry about it.
Your browser should prompt you to save the NetBeans ZIP archive file as marked in the screenshot below. Select Save File and click on OK.
Your browser should start downloading the ZIP archive. It may take a while to complete.
Once the download is complete, navigate to the ~/Downloads directory with the following command:
As you can see, NetBeans ZIP archive (incubating-netbeans-11.0-bin.zip) is in the ~/Downloads directory.
Now, extract the NetBeans ZIP archive to the /opt directory with the following command:
The NetBeans ZIP archive is being extracted as you can see in the screenshot below.
At this point, the ZIP archive is extracted to the /opt directory.
In the next section, I will show you how to start NetBeans. Let’s continue.
Creating Desktop Shortcut for NetBeans:
Now, I am going to show you how to create a desktop shortcut for NetBeans IDE. This way, you can start NetBeans IDE very easily from the Application Menu of Debian 10.
First, create a new file netbeans.desktop in /usr/share/applications directory with the following command:
Now, type in the following lines to the file.
Name=NetBeans 11.0 IDE
Comment=NetBeans 11.0 IDE
Once you type in the lines above, netbeans.desktop file will look as follows. Now, save the file by pressing <Ctrl> + X followed by Y and <Enter>.
Now, add the executable permission to the netbeans.desktop file with the following command:
Now, you should be able to find NetBeans in the Application Menu of Debian 10 as you can see in the screenshot below. Click on it to start NetBeans.
As you can see, the splash screen of NetBeans IDE 11 is displayed. NetBeans IDE 11 is loading.
After a while, NetBeans IDE should start as you can see in the screenshot below.
So, that’s how you install NetBeans IDE on Debian 10. Thanks for reading this article.