• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Install JDK 8 On Ubuntu 18.04 For Netbeans 8.2

Kepala Suku

Web & Mobile Developer
Staff member
I unable to create java project using netbeans 8.2 on my Ubuntu. Then i decided to install java plugin using Tools > plugins but the GUI said that the plugin need JDK.

I opened netbeans configuration inside /usr/local/netbeans-8.2/etc directory and i found that netbeans is using jre like this: netbeans_jdkhome="/usr/local/netbeans-8.2/bin/jre". I looked at /usr/lib/jvm and i realized that the required JDK by Netbeans is not there. Then i need to install it and this is my step to installing JDK 8 on ubuntu 18.04.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
apt-cache search oracle-java8
There is some options to install JDK 8. I choose install with set-default option

sudo apt-get install oracle-java8-installer //install jdk only
sudo apt-get install oracle-java8-set-default //install jdk and set it as default jdk (i chose this option)