Why new project is not opening in Netbeans in ubuntu 16.04?

I've installed Java 9 and netbeans 8.2. When I open netbeans and click new project then nothing shows.


Solution 1:

You maybe missing the Mobility plugin.

Also ensure that you actually have the JDK installed:

  1. Tools>Plugin
  2. Access the Installed tab (to see what plugins are currently installed on your system)

You may also have a corrupted user,dir ; delete the userdir in its entirety, then restart Netbeans.

System.getProperty("user.dir") can be used to find the path of user.dir

Solution 2:

Oracle Netbeans works with Java 8, but although Java 9 has been officially released there are still a few features that are unsupported in Java 9 in Netbeans.

  • There is a tutorial about how to start using Java 9 in Netbeans in Ubuntu at JDK9Support - Netbeans Wiki *. The asterisk after the link is a link to a permanent mirror site in case the original link is removed.

  • Java 8 works in Netbeans out of the box in Ubuntu 16.04. The version of NetBeans in the Ubuntu 16.04 default repositories is NetBeans 8 which targets Java 8 as its compatible Java version.

  • Another alternative is to install both openjdk-8-jdk and openjdk-9-jdk and use either sudo update-alternatives --config java (update-alternatives is provided by default by dpkg in Ubuntu) or update-java-alternatives (which is installed when openjdk-8-jdk is installed) to manually choose which Java to use before running an application.

    $ update-java-alternatives
      usage: update-java-alternatives [--jre-headless] [--jre] [--plugin] [-v|--verbose]
                 -l|--list [<jname>]
                 -s|--set <jname>
                 -a|--auto
                 -h|-?|--help