Java Not Recognized As Default Application

Posted by John on Ask Ubuntu See other posts from Ask Ubuntu or by John
Published on 2012-09-01T23:48:20Z Indexed on 2012/09/02 15:51 UTC
Read the original article Hit count: 337

Filed under:
|

I just installed java according to this article, and 'java -version' displays

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

'update-alternatives --config java' returns this:

There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                  Priority   Status
------------------------------------------------------------
  0            /usr/bin/gij-4.6                       1046      auto mode
  1            /usr/bin/gij-4.6                       1046      manual mode
* 2            /usr/local/java/jdk1.7.0_07/bin/java   1         manual mode

Press enter to keep the current choice[*], or type selection number: 

with update-alternatives --config javac (or javaws) returning similarly.

however java isn't listed in the default applications menu when I click on a .jar file and go to "open with application".

  • I tried to install java this way, and on the update-alternatives part of the command returned me:

    /etc/alternatives/[java,javac,javaws] is dangling, it will be updated with best choice

  • I just confirmed that I can use java, as 'java -jar file.jar' does work.

  • Just figured that I'd mention it, don't know why I didn't before, but when I right click on a .jar file, java 7 run-time isn't even listed there, it seems that the file-manager isn't recognizing it as a program, but it is there, and it does work...

© Ask Ubuntu or respective owner

Related posts about java

Related posts about default-programs