0

i run ubuntu 16.04 and i am trying to execute 'minecraft.jar' located at my desktop. i right click and choose to open it using 'JDK java 8 runtime' but no luck. i then try to execute from the terminal:

s@s-Inspiron-3543:~/Desktop$ java -jar Minecraft.jar

and get the following message:

The program 'java' can be found in the following packages:
* default-jre
* gcj-5-jre-headless
* openjdk-8-jre-headless
* gcj-4.8-jre-headless
* gcj-4.9-jre-headless
* openjdk-9-jre-headless
Try: sudo apt install <selected package>

so, i installed and again i get the same... when i check for the java version:

 s@s-Inspiron-3543:~$ update-java-alternatives -l

i get either

java-1.8.0-openjdk-amd64    1081  /usr/lib/jvm/java-1.8.0-openjdk- amd64

or if i use the 'java version' again i am told where to install it from...

any ideas???

thanks in advance : )

1 Answer 1

0

Java 9, OpenJDK or otherwise, is still under development, last I checked, and is very likely to be buggy - it's very very likely this is due to you using Java 9 and not a Stable Release of Java (such as Java 8).

Consider switching back to Java 8, and not use Java 9 since it's still in 'development' and not yet released. (This applies to Oracle Java as well).

Failing that, remove all Java packages, and try reinstalling them all with:

sudo apt-get install -y openjdk-8-jre openjdk-8-jdk

... which should install all the Java 8 files again and make it usable once again.

3
  • i rolled back to java 8 and edited my question. please have another look... Commented Jun 14, 2017 at 0:19
  • @StamatisDiamantopoulos How did you install the Java executable? It seems to me like it doesn't want to put things in the correct paths.
    – Thomas Ward
    Commented Jun 14, 2017 at 0:34
  • i completey removed all java traces (i hope) following this:askubuntu.com/questions/84483/how-to-completely-uninstall-java and i am reinstalling using: sudo apt-get install -y openjdk-8-jre openjdk-8-jdk . which results in openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) and now it works!!! thanks for the help - it partly resolved the matter : ) Commented Jun 14, 2017 at 0:45

You must log in to answer this question.

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