1

I've been having an issue with Java since I installed Ubuntu and it has been the main reason I have stopped playing certain Java-based games such as Minecraft. You see, although I've downloaded OpenJDK 6 from the Software Center, Ubuntu refuses to recognize that I do in fact have it installed. When I type java -version into the terminal, the following pops up:

The program 'java' can be found in the following packages:
 * default-jre
 * gcj-4.6-jre-headless
 * gcj-4.7-jre-headless
 * openjdk-7-jre-headless
 * openjdk-6-jre-headless
Try: sudo apt-get install <selected package>

Giving it the benefit of the doubt, I tried installing these as well. Unfortunately, java -version continues to present me this same exact message every time. Also, just to make sure the terminal wasn't drunk, I checked Minecraft.jar>Properties>Open With and OpenJDK 6 was, unsurprisingly, not available from the list.

Edit: Here are the results of dpkg -l | grep jdk:

ii  openjdk-6-jre:i386                        6b27-1.12.6-1ubuntu0.12.10.2              i386         OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-6-jre-headless:i386               6b27-1.12.6-1ubuntu0.12.10.2              i386         OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-6-jre-lib                         6b27-1.12.6-1ubuntu0.12.10.2              all          OpenJDK Java runtime (architecture independent libraries)
ii  openjdk-7-jre:i386                        7u21-2.3.9-0ubuntu0.12.10.1               i386         OpenJDK Java runtime, using Hotspot JIT
ii  openjdk-7-jre-headless:i386               7u21-2.3.9-0ubuntu0.12.10.1               i386         OpenJDK Java runtime, using Hotspot JIT (headless)
ii  openjdk-7-jre-lib                         7u21-2.3.9-0ubuntu0.12.10.1               all          OpenJDK Java runtime (architecture independent libraries)
1
  • Please, edit your question to include the output of dpkg -l | grep jdk. Jul 24, 2013 at 15:56

2 Answers 2

0

Maybe something went wrong with the installation and some links are set in a wrong way. Try uninstalling Java:

sudo apt-get purge icedtea-* openjdk-*

Restart your computer and install it again.

Maybe you also want to try out Sun-Java instead of openJDK. Follow this thread:

How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?

0

Personally, I prefer using the Oracle JDK over the default openJDK (IcedTea). Just download the .tar or .bin and extract it to /opt/java/JDK1.7.0_25 (or whatever). Then, use "update-alternatives" to add the links (into your PATH) for that location.

1
  • I tried this as you suggested, however, Oracle JDK 7 still fails to show up on the "Open With" list just as OpenJDK 6 had. Any thoughts? Regardless, thank you for at least attempting to help.
    – Uehara
    Jul 24, 2013 at 20:53

You must log in to answer this question.

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