Same problem with me as well after upgrading to Ubuntu 18.04. Netbeans stopped working. I tried many ways changing the configuration. The primary reason for this problem is java dependency. Netbeans is directly dependent on Oracle Java. Ubuntu 18.04 comes with default open jdk11 installed and set as default java. When Netbeans starts it checks for the dependencies and fails due to this. Though in few cases it opens but not all the features working. Sometime only few windows only working. Specially project explorer doesn't work.
To see the errors you can check the log file from the menu->view->IDELog
System Info:
Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9)
Operating System = Linux version 4.15.0-34-generic running on amd64
Java; VM; Vendor = 1.8.0_181; Java HotSpot(TM) 64-Bit Server VM 25.181-b13; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.8.0_181-b13
Java Home = /usr/lib/jvm/java-8-oracle/jre
System Locale; Encoding = en_IN (nb); UTF-8
Home Directory = /home/mukesh
Current Directory = /home/mukesh
User Directory = /home/mukesh/.netbeans/8.2
Cache Directory = /home/mukesh/.cache/netbeans/8.2
Installation = /home/mukesh/netbeans-8.2/...
------------------------------------------------------------------------------
Finally what worked for me is.
Finally what worked for me is setting the java_home
path in the installed directory of Netbeans. Netbeans 8.2 is installed in HOME directory in general. Sometime it can be different. You can find out using locate
command. change path for java_home inside
/home/<Netbean DIR>/etc/netbeans.conf
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
Restart the Netbeans and it will work all well.
NOTE: Changing the above in system /etc/netbeans.conf
directory will not work.