How to Install NetBeans on Ubuntu 16.04 | 17.10 | 18.04 with Oracle JDK 8 Support

If you’re going to be developing applications based on Java and you need a great development platform to manage your codes, NetBeans might be a great please to start.

This brief tutorial is going to show students and new users how to easily install NetBeans IDE on Ubuntu 16.04 | 17.10 | 18.04 desktop. This post can also be applied to previous and future releases of Ubuntu.

For those who don’t know about NetBeans, it’s an open source code editor based on Java that enables anyone to develop applications for desktop, mobile, web in Java, PHP, C/C++, XML, HTML, JavaScript and many other platforms.

The layout is great, the features are many and it should allow developers to create great applications with ease.

For more about NetBeans, please check this link.

Since NetBeans is based on Java and requires Java in order to function, you must first install Java JDK 8 on Ubuntu. NetBeans doesn’t fully support JDK 9. so you must install version 8 instead. To install Oracle JAVA JDK 8 on Ubuntu, follow the steps below.

Step 1: Install Oracle Java JDK 8

The easiest way to install Oracle Java JDK 8 on Ubuntu is via a third party PPA… To add that PPA, run the commands below

sudo add-apt-repository ppa:webupd8team/java

After running the commands above, you should see a prompt to accept the PPA key onto Ubuntu… accept and continue

Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 9 installer…. the installer should install the latest Java JDK 9 on your Ubuntu machines.

sudo apt update
sudo apt install oracle-java8-installer

When you run the commands above you’ll be prompted to access the license terms of the software… accept and continue.

oracle java 9

Set Oracle JDK8 as default, to do that, install the oracle-java8-set-default package. This will automatically set the JAVA env variable.

sudo apt install oracle-java8-set-default

The command above will automatically set Java 9 as the default… and that should complete your installation, you can check you java version by running following command.

javac -version

Step 2: Downloading NetBeans

After installing Java JDK to your system, run the commands below to download NetBeans 8.2.

cd /tmp && wget -c

Wait until the complete package is downloaded to your machine. it should download to the /tmp directory.

Step 3: Install NetBeans

After downloading the installer package, while still in the /tmp directory, run the commands below to install.

chmod +x 
sudo ./

After running the commands above, run the commands below to begin the installation.

You should then see NetBeans installation wizard started. The default choices should be just fine. You don’t have to customize too much. However, if you know what you’re doing, you can customize all you want.

netbeans install ubuntu wizard

Follow the wizard until you’re done.

Select the default installation directory to install NetBeans

netbeans ubuntu java

Then NetBeans installation should continue. If the installer can’t find where Java JDK is installed, you will have to browse to find it. The default location on Ubuntu is stored at /usr/lib/jvm/java-8-oracle

oracle java netbeans

Continue and click Install to finish the installation.

After installing, launch the application and begin building great applications.



This post shows you how to install NetBeans on Ubuntu systems. NetBeans IDE is a great application that allows to to build great applications.

You must have Java installed in order to have NetBeans running. The post shows you how to also install Open Java JDK/JRE

You may also like the post below:


  1. ubuntu 18.04 with netbeans 8.2
    sudo ./ puts out following message:
    Configuring the installer…
    Searching for JVM on the system…
    Preparing bundled JVM …
    ./ 1: eval: /tmp/.nbi-7055806.tmp/jre-8u101-linux-x86.bin: not found
    Cannot prepare bundled JVM to run the installer.
    Most probably the bundled JVM is not compatible with the current platform.
    See FAQ at for more information.

  2. Juan Carlos Marcano Serrano

    Excellent contribution

  3. Thank you so much..!!

  4. After instaling Netbeans8.2 , and all the packages ,I am not able to open this IDE, Kindly Guide me how to launch Netbeans.

  5. Woow! Thanks a lot

  6. This is very helpful!!! thanks

  7. Thanks man… Really appreciated 🙂

  8. how to rerun apps in terminal ??

  9. Great.. Clean and precise commands….

  10. thanks u this was very helpfull 😉

  11. Khalid Al-Baloushi

    “The command above will automatically set Java 9 as the default…”
    Did you mean “…Java 9…”?
    I am not sure if I get this right, but I think I read somewhere that Netbeans 8.2 is not compatible with JDK 9.

  12. awesome work mate really helpful and it really worked. thanks alot

  13. After instaling Netbeans8.2 how do you launch the ide?

  14. unfortunately didn’t work for me.

  15. can you please guide me to uninstall the netbeans from ubuntu 18.04

  16. Configuring the installer…
    Searching for JVM on the system…
    Extracting installation data…
    Running the installer wizard…
    No protocol specified

    Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread “main”

  17. Thankyou!! This worked…
    Can you please make a site how to insatll any software in ubuntu…..Please make soon

  18. thank you so much

  19. Thank you so much.
    Before , I have a problem to start Netbeans.
    With this tutorial everything is Fine.

  20. trixobase Lunike

    net et précis.
    Merci.. très bon ptit tuto

  21. Thank you so much. It worked for me perfectly.

  22. Hi, I’am from mexico!!, thank you, excellent tutorial.

  23. There is Some Problem with the steps. I Tried many times but shows error.

  24. worked perfectly. Thanks

  25. Thanks, the tutorial was very useful.

  26. After this command sudo ./
    I am getting this
    Gtk-Message: 16:07:04.804: Failed to load module “canberra-gtk-module”
    Please Help me out!!

  27. Ehsanullah naser

    your sit is very good for programmers

  28. Thank you 🙂 all works fine with this tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.