
Ubuntu 26.04 LTS is the first long-term release in two years, and the first one where Wayland is the only desktop session. NetBeans is a Java IDE that does a lot of work in the background, so it hits Wayland, JDK versions and packaging changes more directly than a text editor would. Installing it should take five minutes. Sometimes it takes an afternoon.
Here is how that usually goes wrong. Someone runs a quick apt install netbeans, gets a stale package or nothing at all, and then downloads a random archive from a forum post. Or they install the IDE on a JDK it was never tested against and wonder why the editor freezes during indexing. Or the Snap works but cannot see a toolchain installed under /opt, and nobody explains why.
This guide covers three installation paths and when each one makes sense. It also covers the JDK question, which causes most NetBeans support threads. After that come tuning, security, and a troubleshooting section built from the failures that actually show up on developer workstations and shared build hosts.
The IDE version used here is Apache NetBeans 32, released on November 16, 2026. Ubuntu 26.04 LTS, codename Resolute Raccoon, shipped on April 23, 2026 with Linux kernel 7.0. Its repositories carry OpenJDK 25. These details shape every decision below.
What You Need Before Installing
Check a few things first. It costs two minutes and prevents most of the problems later.
System requirements in practice
Canonical lists Ubuntu Desktop 26.04 LTS as needing a 2 GHz dual-core CPU, 6 GB of RAM and 25 GB of storage for a comfortable experience. That is the operating system alone. NetBeans with a mid-sized Maven project, a language server and a browser open will happily use another 2 to 4 GB. A workstation with 8 GB of RAM works, but 16 GB is where Java development stops feeling cramped.
Disk speed matters more than most people expect. NetBeans indexes source trees and dependency jars on first open. On a spinning disk or a congested network share, that scan can run for many minutes. An NVMe or SATA SSD cuts it to seconds.
Which JDK does NetBeans need?
NetBeans runs on a JDK, and your projects compile with a JDK. These are two separate choices, and mixing them up causes a lot of confusion.
For NetBeans 31, the project states that the IDE supports running on JDK 26, 25 or 21, with initial support for JDK 27. It also says the runtime JDK the IDE uses does not limit which JDKs your projects can use. The Snap listing says Java 21 or later is required. Ubuntu 26.04 ships OpenJDK 25 in its archive, which sits inside the supported range. That makes it a sensible default.
Check what is already on the machine:
java -version
javac -version
update-alternatives --list java
If javac is missing, you have a JRE but not a full JDK. NetBeans needs the JDK.
Update the system first
sudo apt update
sudo apt full-upgrade -y
This is not ceremony. On a fresh 26.04 install, a pending kernel or library update can change behavior mid-session. Reboot if a new kernel was installed. Do it before you start debugging anything.
Choosing an Installation Method
There are three realistic options. Each fits a different kind of user.
| Method | Best for | Updates | Main drawback |
|---|---|---|---|
Snap (netbeans --classic) |
Most desktop users | Automatic | Convenience build, not an official release |
| Official binary ZIP | Developers who want control | Manual | You manage the JDK and launcher entries |
| .deb package from the download page | Users who want a native package | Manual download | Third-party packaging, check the source |
The download page for NetBeans 30 and 31 lists installers and packages, including community-built .deb and .rpm packages (named Codelerity, built with NBPackage) and a Linux snap package. These include a local Temurin JDK so the IDE runs out of the box.
One caveat deserves attention. The Snap listing itself states that it is a convenience binary of the IDE and not an official release. For a personal laptop that is usually fine. For a regulated environment where every binary needs a verified provenance trail, use the Apache source or binary release and verify checksums.
Method 1: Install NetBeans With Snap
This is the fastest route and the one most readers will want.
Step 1: Confirm snapd is present
Ubuntu desktop ships with snapd. Minimal and server installs may not.
sudo apt update
sudo apt install snapd
Step 2: Install the JDK
Snap-packaged NetBeans still needs a JDK on the host, since it requires Java 21 or later. Install OpenJDK 25 from the Ubuntu archive:
sudo apt install openjdk-25-jdk
If apt cannot find the package, run apt search openjdk- | grep jdk and pick whichever version your mirror lists. OpenJDK 21 is a safe fallback and is in the supported range.
Step 3: Install the IDE
sudo snap install netbeans --classic
The --classic flag is necessary. It lets the IDE read your project directories, call compilers, and reach build tools outside the strict confinement sandbox. An IDE that could only see its own sandbox would be useless for real work.
At the time of writing, the stable channel was at version 32, updated on November 16, 2026. Snap refreshes that package in the background.
Step 4: Launch and verify
netbeans
Or open it from the Activities overview. On the first start, NetBeans may ask which JDK to use. Point it to /usr/lib/jvm/java-25-openjdk-amd64 or the equivalent path on your architecture.
Verify the installed revision:
snap list netbeans
snap info netbeans
Pinning or holding updates
Auto-refresh is great until an update lands in the middle of a release week. You can hold it:
sudo snap refresh --hold=720h netbeans
To update manually later:
sudo snap refresh netbeans
On a shared development machine, holding the IDE version for a sprint is a quiet way to avoid “it worked yesterday” tickets.
Method 2: Install From the Official Binary ZIP
Sysadmins often prefer this. No daemon manages it, no sandbox layer sits in the way, and you can keep several versions side by side.
Step 1: Download and verify
Get the binary archive from the Apache NetBeans download page. Alongside it you will find a SHA-512 checksum and a PGP signature. Verify both. This takes a minute and matters when the machine builds code that ships.
cd ~/Downloads
sha512sum -c netbeans-32-bin.zip.sha512
gpg --import KEYS
gpg --verify netbeans-32-bin.zip.asc netbeans-32-bin.zip
Filenames can differ slightly from what is shown here, so match them to what you actually downloaded.
Step 2: Extract to a stable location
sudo apt install unzip
sudo mkdir -p /opt/netbeans
sudo unzip netbeans-32-bin.zip -d /opt/netbeans-32
sudo ln -sfn /opt/netbeans-32/netbeans /opt/netbeans/current
The symlink pattern pays off at upgrade time. You extract the new release beside the old one, move the link, and roll back by moving it again.
Step 3: Configure the JDK path
sudo nano /opt/netbeans/current/etc/netbeans.conf
Find or add the netbeans_jdkhome line:
netbeans_jdkhome="/usr/lib/jvm/java-25-openjdk-amd64"
You can also pass it at launch:
/opt/netbeans/current/bin/netbeans --jdkhome /usr/lib/jvm/java-25-openjdk-amd64
Step 4: Add a desktop launcher
Create a launcher so the IDE shows up in the application grid:
nano ~/.local/share/applications/netbeans.desktop
[Desktop Entry]
Type=Application
Name=Apache NetBeans
Comment=Java and PHP IDE
Exec=/opt/netbeans/current/bin/netbeans
Icon=/opt/netbeans/current/nb/netbeans.png
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=NetBeans
update-desktop-database ~/.local/share/applications
The StartupWMClass line matters on Wayland. Without a matching class, GNOME may show two icons in the dock, one for the launcher and one for the running window. If that happens, check the real class with xprop WM_CLASS under XWayland, or look at the app ID with Looking Glass (Alt+F2, then lg).
Method 3: Install a .deb Package
If you want an entry in dpkg and a clean uninstall, the community .deb packages are available from the download page. Use the file for NetBeans 32 from the current release page, since the release lineup changes every few months.
cd ~/Downloads
sudo apt install ./apache-netbeans_32_amd64.deb
The ./ prefix tells apt to resolve dependencies from a local file. Do not use dpkg -i and then fix missing dependencies later. It works, but it leaves you debugging half-configured packages.
Some of these packages bundle a Temurin JDK for the IDE runtime. That is handy because it separates the IDE’s runtime from the JDK you use for builds. One thing to remember is that a bundled runtime does not receive Ubuntu security updates. When a new JDK security release comes out, you wait for the next package.
Remove it cleanly with:
sudo apt remove apache-netbeans
sudo apt autoremove
User settings stay in your home directory afterward, which is the right default.
Setting Up Your First Project
An installed IDE is only useful if it builds something. This quick test catches JDK and Maven misconfigurations early.
Install build tools
sudo apt install maven gradle git
mvn -v
Ubuntu’s Gradle package can lag behind upstream. If your project uses a recent Gradle wrapper, rely on the wrapper (./gradlew) instead of the system package. Wrappers pin the exact version and give reproducible builds, so the IDE just calls them.
Create a test project
In NetBeans, choose File, New Project, then Java with Maven, then Java Application. Name it, accept the defaults, and press Run. If you see output in the Output pane, the toolchain is healthy.
Language and plugin support
NetBeans handles Java SE, Jakarta EE, PHP, HTML5, JavaScript and more out of the box or via plugins. Open Tools, then Plugins, and enable only what you will use. Every extra module adds startup time and memory overhead. A developer who writes Java services does not need PHP tooling loaded.
Troubleshooting Common Problems
“Cannot locate Java Installation” at startup
The launcher cannot find a valid JDK. Confirm one exists:
ls /usr/lib/jvm/
Then set netbeans_jdkhome in netbeans.conf or pass --jdkhome. If the folder is empty, install openjdk-25-jdk and try again.
The IDE starts, but projects will not compile
Check the project’s Java platform under Project Properties, Build, Compile. A project set to source level 25 will not build on a JDK 21 platform. Also remember that the JDK running the IDE does not restrict the JDK used for projects, so add the right platform under Tools, Java Platforms.
Snap installs but the app does not launch
Run it from a terminal to see the real error:
snap run netbeans
journalctl --user -e | grep -i netbeans
Common causes are a missing JDK, a blocked refresh in progress, or a broken desktop integration after an upgrade. Try:
sudo snap refresh netbeans
sudo snap restart netbeans
“snap: command not found” or “classic confinement requires snapd”
On minimal installs, snapd may be missing, or /snap may not exist. Install snapd and re-login so paths update. In some containers, classic snaps do not work at all. Use the ZIP method there.
Blurry fonts or tiny interface on HiDPI
Add -J-Dsun.java2d.uiScale=2 to netbeans_default_options, restart, and adjust. If fonts remain soft, switch the font under Tools, Options, Appearance to a hinted one such as DejaVu Sans Mono or JetBrains Mono.
Out of memory errors
Symptoms include a red memory warning, freezing, or java.lang.OutOfMemoryError: Java heap space. Raise -Xmx in steps of 512 MB. If it keeps happening, check for a very large module, or close projects you do not need. Also consider that a plugin might leak. Disable recently added ones to test.
Slow startup after upgrading
A user directory from an older release can carry stale caches. Back it up, then clear the cache:
rm -rf ~/.cache/netbeans
Do this with the IDE closed. For ZIP installs, the cache location may be under the user directory you specified.
Maven build fails with certificate errors
This usually points to a corporate proxy doing TLS inspection. Import the proxy’s root certificate into the JDK trust store:
sudo cp corp-root.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
On Debian-based systems, the ca-certificates-java hook updates Java’s trust store for the system JDK. If the IDE runs on a bundled JDK instead, import the certificate there with keytool.
Keyboard shortcuts clash with GNOME
Shortcuts like Ctrl+Alt+Arrow keys may be grabbed by the desktop. Remap them in Settings, Keyboard, or rebind them in NetBeans under Tools, Options, Keymap. It takes thirty seconds and saves daily annoyance.