Fedora

Install Apache NetBeans on Fedora 45 / 44

Fedora doesn’t package NetBeans, so the IDE comes from Apache’s zip, Flathub or the Snap Store, and the zip still needs a JDK from Fedora. That JDK is where the usual advice now goes wrong. java-latest-openjdk-devel, the package older guides tell you to install, resolved to an early-access JDK 27 build on both Fedora 45 and Fedora 44. NetBeans 31 is supported on JDK 26, 25 and 21, with only initial support for 27. Install the JDK 25 package instead and the IDE runs on a supported, Fedora-patched runtime.

Original content from computingforgeeks.com - post 18670

You’ll install that JDK, download and verify the NetBeans zip, add it to the GNOME menu, create and run a first Maven project, and see what the Flatpak and Snap builds change. We tested in October 2026 on Fedora 45 Workstation, where the screenshots come from, and on Fedora 44, both running Apache NetBeans 31 on OpenJDK 25.

Install a JDK that NetBeans supports

NetBeans needs a full JDK, not just a runtime, because it compiles, debugs and runs your code with the JDK’s own tools. Our fresh Fedora 45 Workstation had only java-25-openjdk-headless installed, which has no desktop libraries and cannot draw the IDE’s windows. Here is what the Fedora 45 and 44 repositories offered when we checked, against the range Apache lists for NetBeans 31:

Fedora packageJDK it installsNetBeans 31 support
java-25-openjdk-devel25.0.4.1Supported
java-latest-openjdk-devel27 early accessInitial support only
java-21-openjdk-develnot in either repositorySupported, if you bring your own

Install the JDK 25 package, and if you need several JDKs side by side, our guide to Java on Fedora covers switching between them. The package pulls in the full java-25-openjdk runtime alongside the compiler, five packages in all on our Workstation box.

sudo dnf install -y java-25-openjdk-devel

Check that both the runtime and the compiler answer, since javac is what proves you have the JDK and not only the JRE.

java -version
javac -version

Fedora 45 reported the same build on both:

openjdk version "25.0.4.1" 2026-08-18
OpenJDK Runtime Environment (Red_Hat-25.0.4.1.1-1) (build 25.0.4.1+1)
OpenJDK 64-Bit Server VM (Red_Hat-25.0.4.1.1-1) (build 25.0.4.1+1, mixed mode, sharing)
javac 25.0.4.1

If you already installed java-latest-openjdk-devel, you don’t have to remove it. We installed it next to JDK 25 on Fedora 45, and alternatives kept /usr/lib/jvm/java-25-openjdk/bin/java as the default java, which is what the launcher resolves. A fresh NetBeans start after that still logged /usr/lib/jvm/java-25-openjdk as its Java home. The early-access JDK only matters if you point NetBeans at it on purpose.

Download and verify the NetBeans zip

The zip from Apache is the reference build, the same file the Flatpak repackages. Apache released NetBeans 31 on 10 August 2026, and the Flathub build is dated four days later. Apache’s NetBeans 31 download page lists the supported JDKs and checksums. Read the current version from the project’s GitHub releases rather than hardcoding it.

NB_VER=$(curl -s https://api.github.com/repos/apache/netbeans/releases/latest | grep -oP '"tag_name": "\K[0-9.]+')
echo $NB_VER

For us it printed 31. Download the zip from Apache’s CDN and its checksum from the main Apache server, then let sha512sum compare them. The archive is close to 500 MB, so a mismatch is worth catching before you unpack it.

cd /tmp
curl -LO "https://dlcdn.apache.org/netbeans/netbeans/${NB_VER}/netbeans-${NB_VER}-bin.zip"
curl -LO "https://downloads.apache.org/netbeans/netbeans/${NB_VER}/netbeans-${NB_VER}-bin.zip.sha512"
sha512sum -c netbeans-${NB_VER}-bin.zip.sha512

Both Fedora releases returned the same result:

./netbeans-31-bin.zip: OK

Apache’s CDN only carries the current release. If you need an older one to match a team’s setup, the same paths work under archive.apache.org/dist/netbeans/netbeans/.

Unpack NetBeans under /opt

Extract it to /opt so every account on the machine can use it, and link the launcher into /usr/local/bin so netbeans works from any terminal. Fedora Workstation already has unzip; minimal installs may need sudo dnf install -y unzip first.

sudo unzip -q netbeans-${NB_VER}-bin.zip -d /opt
sudo ln -sf /opt/netbeans/bin/netbeans /usr/local/bin/netbeans

The unpacked tree came to 993 MB on both releases, and the launcher finds JDK 25 through the system java on its own, so there is nothing to set in /opt/netbeans/etc/netbeans.conf. That file is where you would pin a different JDK with netbeans_jdkhome, the line it ships commented out. You can delete the zip from /tmp now.

Add NetBeans to the GNOME menu

GNOME won’t list the IDE until you add a desktop entry, because the zip ships none. Create it under /usr/local/share/applications, which belongs to you rather than to any package. Fedora Workstation ships only vi from vim-minimal, so run sudo dnf install -y vim-enhanced first or use the editor you prefer.

sudo vim /usr/local/share/applications/netbeans.desktop

This is the exact file we used, and desktop-file-validate accepted it without a warning:

[Desktop Entry]
Name=Apache NetBeans
Comment=Apache NetBeans IDE
Exec=/opt/netbeans/bin/netbeans
Icon=/opt/netbeans/nb/netbeans.png
Terminal=false
Type=Application
Categories=Development;IDE;Java;
StartupWMClass=Apache NetBeans IDE 31

The last line is the one people leave out, and it decides whether the running IDE sits under its own icon in the dash or under a generic one. NetBeans runs through XWayland, and xprop showed its window class as Apache NetBeans IDE 31, version number included. So when you move to the next release, change that line as well, or the icon stops matching the window.

Launch NetBeans and run a first project

Start it from Activities or with netbeans & in a terminal. The first start indexes the bundled modules, so expect a short wait before it opens on the start page with the usual project and file shortcuts.

Apache NetBeans IDE 31 start page on Fedora 45 Workstation with New Project and Open Project shortcuts

Press Ctrl+Shift+N for a new project. Java with Maven is the default category and Java Application the default type, which is the right starting point for most work. The description pane says the feature is not enabled yet, because NetBeans loads its Java support on demand, and pressing Next switches it on.

NetBeans New Project wizard on Fedora 45 with Java with Maven and Java Application selected

Accept the default name and package on the next page and press Finish. The project opens with a main method that prints Hello World!. Press F6 to run it. The first run downloads the Maven plugins the build needs into ~/.m2, so give it a moment, and our run reported BUILD SUCCESS after just under 20 seconds.

NetBeans running a Maven Java application on Fedora 45 with Hello World and BUILD SUCCESS in the output window

NetBeans uses the Maven it bundles, so you don’t need Fedora’s maven package for this. If your team pins a Maven version, install it as in our Maven on Fedora guide and point the IDE at it under Tools, Options, Java, Maven. Help, About confirms what the IDE is running on, which is the quickest check after any JDK change.

NetBeans About dialog on Fedora 45 showing Apache NetBeans IDE 31 running on OpenJDK 25.0.4.1

Ours showed NetBeans 31 on OpenJDK 25.0.4.1. The same dialog lists where your settings live, and both paths are named after the release:

  • ~/.netbeans/31 for settings and installed plugins
  • ~/.cache/netbeans/31 for indexes, 41 MB after our first project
  • ~/.m2 for Maven downloads, shared with any command-line Maven

With that one project open, the IDE’s Java process held about 1 GB of resident memory on our 8 GB VM. Budget for that plus your builds, and an 8 GB machine stays comfortable for a single project.

On Fedora 44 we started the IDE headless under xvfb-run rather than on a desktop. The zip passed its checksum, unpacked to the same size, and the IDE’s log recorded Apache NetBeans IDE 31 running on /usr/lib/jvm/java-25-openjdk.

Install NetBeans from Flathub instead

Flathub carries NetBeans 31 with its own JDK, so this route skips the JDK step entirely. Fedora Workstation already has a flathub remote, and NetBeans 31 is in it, so skip the next command there. On that remote, Fedora filters what Flathub offers, and running remote-add against it removes the filter. On Server and other editions without the remote, add it, as our Flatpak and Flathub guide explains.

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

From a terminal in the desktop session, flatpak’s polkit rules let an administrator install system-wide without extra steps. Our non-interactive SSH session had no way to answer polkit, and a system-wide install failed with Flatpak system operation Deploy not allowed for user, so over SSH run it with sudo.

sudo flatpak install -y flathub org.apache.netbeans

Check what you got before you rely on it, starting with the permissions the app asks for.

flatpak info --show-permissions org.apache.netbeans

Two lines stood out in the output:

[Context]
shared=ipc;network;
sockets=x11;
devices=all;dri;
filesystems=xdg-run/keyring;host;

filesystems=host means the Flatpak can read and write your whole filesystem, much like the zip install, so it is not the sandboxed IDE many guides describe. sockets=x11 means it runs through XWayland. It also uses its own JDK, which reported OpenJDK 26.0.2 rather than Fedora’s 25.

It is also much heavier. The app took 1.8 GB and pulled in the 1.7 GB freedesktop SDK runtime it is built on, against 993 MB for the zip plus the system JDK. Inside the sandbox, git in a terminal is the SDK’s own, and the host’s is only reachable at /run/host/usr/bin/git. The IDE’s Git support is built in, so it doesn’t depend on either copy. Flatpak updates arrive with your other Flatpak apps.

Install the NetBeans snap

The Snap Store build is published by the Apache NetBeans project’s verified account as a convenience binary, not an official Apache release. It is a classic snap, so it runs without snap confinement and uses the JDK already on the system, and on Fedora 44 it started on the same /usr/lib/jvm/java-25-openjdk as the zip. Fedora packages snapd but doesn’t install it by default, so add it first, along with the /snap link that classic snaps expect.

sudo dnf install -y snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap

A fresh snapd needs a minute to seed its base snaps, so wait for that before installing. The --classic flag is required because the IDE has to read your projects and the system JDK outside snap confinement.

sudo snap wait system seed.loaded
sudo snap install netbeans --classic

The two stars after the publisher name are snapd’s plain-text mark for a verified publisher; a UTF-8 terminal shows a check mark there instead.

netbeans 31 from Apache NetBeans** installed

On disk the snap itself is 537 MB, and with the core22 base and snapd’s own snap the snaps directory held 631 MB. Log out and back in so /var/lib/snapd/snap/bin lands on your PATH and GNOME picks up the launcher. One difference from the zip: settings live under ~/snap/netbeans/ in a folder named after the snap revision, 149 on our box, not in ~/.netbeans.

Pick the right install method

All three routes ran the same NetBeans 31. They differ in the JDK under the IDE, how much disk they take and how updates arrive:

RouteJDK under the IDEDisk usedUpdates
Zip in /optFedora’s OpenJDK 25993 MB plus the JDKBy hand, a new zip
FlatpakBundled OpenJDK 26.0.21.8 GB app plus 1.7 GB SDK runtimeWith flatpak update
SnapFedora’s OpenJDK 25631 MB of snaps, including snapd and core22Automatic snap refreshes

For Java work on Fedora we’d use the zip. It runs on Fedora’s own JDK 25, which gets Fedora’s security updates, it needs a fraction of the Flatpak’s disk, and an upgrade means removing /opt/netbeans, unpacking the new zip in its place and changing the one StartupWMClass line. Unzipping over the old tree prompts to overwrite files and leaves the previous release’s jars behind. Take the snap if you already run snapd and want updates handled for you, since it uses the same JDK. The Flatpak suits a machine without a system JDK, at the cost of the extra runtime. If you only want a lighter editor for Java, our guide to Visual Studio Code on Fedora covers that route. Whichever you choose, leave java-latest-openjdk-devel for testing your code on the next Java, not for running the IDE.

Keep reading

How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Fedora How to Upgrade Fedora 44 to Fedora 45 (GUI, CLI and Rollback) Enable RPM Fusion and Install Multimedia Codecs on Fedora 45 / 44 / 43 Fedora Enable RPM Fusion and Install Multimedia Codecs on Fedora 45 / 44 / 43 Backup and Restore Linux Systems with Timeshift Debian Backup and Restore Linux Systems with Timeshift Switch Fedora From GRUB to systemd-boot With bootctl Fedora Switch Fedora From GRUB to systemd-boot With bootctl DNF5 Cheatsheet for Fedora 45 / 44: Tested Commands and Fixes Fedora DNF5 Cheatsheet for Fedora 45 / 44: Tested Commands and Fixes Things to Do After Installing MX Linux Desktop Things to Do After Installing MX Linux

4 thoughts on “Install Apache NetBeans on Fedora 45 / 44”

  1. I have a problem with procedure in the step 3:
    My fedora version is the 36

    francis@fedora tmp]$ sudo ./Apache-NetBeans-13-bin-linux-x64.sh
    Configuring the installer…
    Searching for JVM on the system…
    Extracting installation data…
    Running the installer wizard…
    Can`t initialize UI
    Running in headless mode
    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”

    i tried to execute with the DISPLAY variable, but i have the same result
    [francis@fedora tmp]$ DISPLAY=:0.0; sudo ./Apache-NetBeans-13-bin-linux-x64.sh
    [sudo] Mot de passe de francis :
    Configuring the installer…
    Searching for JVM on the system…
    Extracting installation data…
    Running the installer wizard…
    Can`t initialize UI
    Running in headless mode
    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”

    Reply

Leave a Comment

Press ESC to close