1080*80 ad

Installing NetBeans IDE on Rocky Linux 8

How to Install NetBeans IDE on Rocky Linux 8: A Step-by-Step Guide

Apache NetBeans is a powerful and popular Integrated Development Environment (IDE) widely used by developers for Java, PHP, C++, and other programming languages. Its rich feature set, including an intelligent code editor, debugger, and profiler, makes it an excellent choice for any development workflow. If you’re running Rocky Linux 8 and want to set up this robust tool, this guide will walk you through three reliable installation methods.

Whether you prefer the official installer, the convenience of Snap packages, or the modern approach of Flatpak, we have you covered.

Prerequisites: Installing the Java Development Kit (JDK)

Before installing NetBeans, you must have a Java Development Kit (JDK) installed on your system, as NetBeans itself is a Java application.

First, it’s always a good practice to update your system’s package repository to ensure you have the latest software versions and security patches. Open your terminal and run:

sudo dnf update -y

Next, we will install OpenJDK 11, which is a stable and widely compatible version for NetBeans.

sudo dnf install java-11-openjdk-devel

Once the installation is complete, you can verify that Java was installed correctly by checking its version.

java --version

If the command returns details about your OpenJDK installation, you are ready to proceed with installing NetBeans.

Method 1: Using the Official NetBeans Installer Script

This method involves downloading the official installer script directly from the Apache NetBeans project. It gives you the most control over the installation process.

Step 1: Download the Installer
Navigate to the official Apache NetBeans downloads page to find the latest stable release. You can download the .sh installer script using your web browser or grab it directly in the terminal with the wget command.

For example, to download NetBeans 19, you would run:

wget https://dlcdn.apache.org/netbeans/netbeans-installers/19/Apache-NetBeans-19-bin-linux-x64.sh

Note: Be sure to check the official site for the latest version and update the URL accordingly.

Step 2: Make the Script Executable
By default, downloaded files do not have execute permissions. You need to grant permission for the script to run.

chmod +x Apache-NetBeans-19-bin-linux-x64.sh

Step 3: Run the Installer
Now, execute the installer script with superuser privileges.

sudo ./Apache-NetBeans-19-bin-linux-x64.sh

This command will launch a graphical installation wizard. Simply follow the on-screen prompts, accept the license agreement, and confirm the installation path and JDK location. The wizard will handle the rest.

Method 2: Installing NetBeans with Snap

Snap is a universal package management system that allows you to install applications in a sandboxed environment. This method is straightforward and ensures that NetBeans can be easily updated.

Step 1: Install and Enable Snapd
If you don’t have Snap installed on your Rocky Linux system, you can add it easily. First, you’ll need the EPEL repository.

sudo dnf install epel-release
sudo dnf update

Now, install the snapd package.

sudo dnf install snapd

Once installed, you must enable and start the main snap communication socket.

sudo systemctl enable --now snapd.socket

To enable support for classic snaps, create a symbolic link:

sudo ln -s /var/lib/snapd/snap /snap

Step 2: Install NetBeans
With Snap configured, installing NetBeans is as simple as running a single command. The --classic flag is required because NetBeans needs broader system access than a typical sandboxed application.

sudo snap install netbeans --classic

Snap will automatically download and configure NetBeans on your system.

Method 3: A Modern Approach with Flatpak

Flatpak is another universal packaging format that provides a sandboxed application environment. It’s an increasingly popular method for installing desktop applications on Linux.

Step 1: Install Flatpak and Add the Flathub Repository
First, install the Flatpak framework on your system.

sudo dnf install flatpak

Next, you must add the Flathub repository, which is the primary source for Flatpak applications.

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

A system restart is recommended after adding the repository to ensure all components are properly integrated.

Step 2: Install NetBeans via Flatpak
You can now install NetBeans directly from Flathub using its application ID.

flatpak install flathub org.apache.netbeans

Flatpak will resolve and install all necessary dependencies.

Launching and Using NetBeans on Rocky Linux

Regardless of the method you chose, you can now launch NetBeans.

Simply go to your system’s application launcher (Activities menu) and search for “NetBeans.” Click the icon to start the IDE. On the first launch, NetBeans may take a few moments to initialize its modules and user directory.

Once it’s open, you can start creating new projects, importing existing ones, and exploring the vast ecosystem of plugins to customize your development environment.

Final Thoughts

You have successfully installed Apache NetBeans on your Rocky Linux 8 system. Each installation method offers distinct advantages:

  • The official installer provides granular control and is ideal for users who want a traditional setup.
  • Snap offers simplicity and automatic updates, making it a low-maintenance option.
  • Flatpak provides excellent sandboxing and system isolation, which is a great security feature.

By choosing the method that best fits your workflow, you now have a professional-grade IDE ready for all your coding projects. Happy coding

Source: https://kifarunix.com/install-netbeans-ide-on-rocky-linux-8/

900*80 ad

      1080*80 ad