Ubuntu – Netbeans 7.0.1 installed but won’t run

javanetbeanssoftware installation

I installed Netbeans 7.0.1, and I've made sure to install all the JDKs and JREs I could find. It installed without errors. I also saw this question and made sure I followed all the instructions there as well.

I never got any error messages of any kind. So far as I know, it installed okay.

However, when I try to run Netbeans, I get no response. If I run it from the command line, after about 30 seconds, the prompt just comes back. There's no error message of any kind to let me know what's wrong.

$ /bin/sh "/home/dave/netbeans-7.0.1/bin/netbeans"
$

What's the issue, and how do I get Netbeans to run?


New command line output as a result of following instructions offered in an answer:

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.
$ /bin/sh "/home/dave/netbeans-7.0.1/bin/netbeans"
$

Best Answer

  • ok, dave, since you posted as a search term ubuntu 11.10.. ill assume you are running Ubuntu 11.10.. :D

    I am running also the same version, fully updated today, the version im running is 64-bits, but that shouldn't make the difference.

    This is what i did to install netbeans 7.0.1 on my box:

    1) Download Netbeans from their website: http://netbeans.org/downloads/index.html choose freely the version you need. (dont try to install it yet)

    2) Install from the repos the openjdk 6: sudo apt-get install openjdk-6-jdk

    3) run the netbeans installer you downloaded previously:

     $ sh /path_to_downloaded_file/netbeans-7.0.1-ml-linux.sh
    

    or if you want to make it easier for the eye, "cd" to the place where you saved the download, (usually the Downloads folder) and :

    $ sh netbeans-7.0.1-ml-linux.sh
    

    The installer should launch and check for the JDK, it also shouldn't say anything about the JDK (it displays a warning message only if it doesn't finds it).

    Now you should be able to follow the installer without any problems.

    I just downloaded and installed the full version without issues following this steps:

      488  clear
      489  cd Downloads/
      490  ls
      491  sh netbeans-7.0.1-ml-linux.sh  
      492  sudo apt-get install openjdk-6-jdk 
      493  sh netbeans-7.0.1-ml-linux.sh 
      494  history 
    your_user@host_name:~/Downloads$ 
    

    I hope this works for you...

    This is the reference where i found the solution that worked for me: http://ubuntuforums.org/showthread.php?t=1873487&page=2

    [Edit] Just in case, check the download checksum

    $ md5sum netbeans-7.0.1-ml-linux.sh
    

    It should return that it sais on the netbeans.org download page says, in my case thisis the output for the 204mb download:

    $ md5sum netbeans-7.0.1-ml-linux.sh 
    3559ec7d1ce1d4bcafd7eea98cc9c648  netbeans-7.0.1-ml-linux.sh