0
austin@HP-ENVY-m6-Notebook-PC:~$ java -version
The program 'java' can be found in the following packages:
 * default-jre
 * gcj-4.8-jre-headless
 * openjdk-7-jre-headless
 * gcj-4.6-jre-headless
 * openjdk-6-jre-headless
Try: sudo apt-get install <selected package>
austin@HP-ENVY-m6-Notebook-PC:~$ sudo apt-get install default-jre
Reading package lists... Done
Building dependency tree       
Reading state information... Done
default-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
austin@HP-ENVY-m6-Notebook-PC:~$ 

Any suggestions?

4
  • Does update-alternatives --list java show anything? Aug 29, 2014 at 21:19
  • austin@HP-ENVY-m6-Notebook-PC:~$ update-alternatives --list java update-alternatives: warning: alternative /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java (part of link group java) doesn't exist; removing from list of alternatives update-alternatives: warning: alternative /usr/local/java/jre1.8.0_11/bin/java (part of link group java) doesn't exist; removing from list of alternatives austin@HP-ENVY-m6-Notebook-PC:~$
    – user191846
    Aug 29, 2014 at 23:49
  • Looks like some files got manually deleted - maybe try re-installing the package? sudo apt-get install --reinstall openjdk-7-jre-headless Aug 29, 2014 at 23:58
  • Setting up openjdk-7-jre-headless:amd64 (7u65-2.5.1-4ubuntu1~0.14.04.2) ... update-alternatives: warning: alternative /usr/local/java/jre1.8.0_11/bin/java (part of link group java) doesn't exist; removing from list of alternatives update-alternatives: warning: alternative /usr/local/java/jre1.8.0_11/bin/java (part of link group java) doesn't exist; removing from list of alternatives
    – user191846
    Aug 30, 2014 at 13:34

1 Answer 1

0

First off, you should install the official Java. Install openjdk-7-jre.

The default-jre package doesn't really do much. I don't think it really does anything.


If this doesn't work, check your PATH variable and make sure it contains the Java install path. You can check where it is installed by running dpkg-query -S 'openjdk-7-java*' and look for the java binary. It is usually named java and is usually in a bin folder. Add that to the PATH variable.

2
  • I have already installed openjdk-7-jre. However, when I type "java" into the command-line, packages are suggested as seen in the snippet above.
    – user191846
    Aug 29, 2014 at 20:56
  • After running "dpkg-query -S 'openjdk-7-java*'" the terminal displayed some .desktop files, but a java binary did not show up anywhere.
    – user191846
    Aug 29, 2014 at 23:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .