After fresh Ubuntu 18.04 installation and afterwards a netbeans installation, netbeans does not start. netbeans was installed with
sudo apt install netbeans
some other java programms (at least Eclipse) do not start too.
when starting netbeans from commandline the JVM prints folowing WARNINGS:
➜ ~ netbeans
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.netbeans.ProxyURLStreamHandlerFactory (file:/usr/share/netbeans/platform18/lib/boot.jar) to field java.net.URL.handler
WARNING: Please consider reporting this to the maintainers of org.netbeans.ProxyURLStreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
➜ ~
Ubuntu's repository still has Netbeans 8.1 but JDK 11. So I've downloaded Netbeans 8.2 from Netbeans Website
After downloading Netbeans 8.2, follow these steps:
and follow on screen instructions. Import settings and launch the netbeans from app drawer.
Also if you have any package with name as JDK 8, just remove it. You can find the packages installed by using
and remove all packages with name as openjdk-8- by using,
For Installation of Netbeans 9.0 see here.
I was able to get it working by installing and setting JDK8 as default.
I followed the instructions on this website: https://linuxconfig.org/how-to-install-java-on-ubuntu-18-04-bionic-beaver-linux
specifically:
Adding the PPA repository:
Install Java 8, and set as default:
I was able to install using the netbeans .sh file installed after that
I was able to solve this by running
sudo update-alternatives --config java
and then selecting the java-8 option rather than the default java-11. You will need to have the java-8 openjdk package still installed for this to work though.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
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 usinglocate
command. change path for java_home insideRestart the Netbeans and it will work all well.
NOTE: Changing the above in system
/etc/netbeans.conf
directory will not work.Remove Java 11 (which is not compatible with Netbeans 8.2 on Ubuntu 18.xx):
Install Java 8 and Netbeans 8.2 (Netbeans is about 214MB):
When it asks about Java Location select
/usr/lib/jvm/java-8-openjdk-amd64
.After installation you can access it via
if you chose default location.
What solved the problem for me was two things:
I have the same problem ,though i resolved it! Actual problem which jdk version is used by Netbeans.As in the bionic beaver comes with new jdk version ,while old cofiguration of the Netbeans use the old one ,first uninstall existing netbeans and then download netbeans from the website the during installation ,seletct jdk8 as option . It worked for me , may work for you !
I am learner, your suggestion are always welcome!