Error when launching Minecraft on Ubuntu Mate on Raspberry pi 3

No problem. :wink:

So, if you haven’t, go to Oracle’s website and download Java SE Development Kit 8u151 for Linux ARM 32 Hard Float ABI. You should get a file named jdk-8u151-linux-arm32-vfp-hflt.tar.gz in your Downloads folder.

When it’s done, go in the /usr/java you’ve created previously and unpack the archive:

cd /usr/java
sudo tar -xzf ~/Downloads/jdk-8u151-linux-arm32-vfp-hflt.tar.gz

You should then have a subfolder in /usr/share, (probably) named “jdk1.8.0_151”. Confirm that it’s the case before continuing.

1 Like

Done ,but I dont have a file named /usr/share. I only have a file named jdk1.8.0_151 in my home folder.

Whoops, I meant /usr/java. So, it unpacked it in your home? Sorry, I haven’t used tar in command line since long ago. So, move the folder at the right place:

sudo mv ~/jdk1.8.0_151 /usr/java/

Then, set it as in the tutorial but with the right name:

sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_151/bin/java 1000
sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_151/bin/javac 1000

Finally, check that it’s properly installed:

java -version
1 Like

When I go to mv it it says.

mv: cannot move ‘/home/izayah/jdk1.8.0_151’ to ‘/usr/java/jdk1.8.0_151’: Directory not empty

Ok, we’ll start again. First, let’s delete the dirs that exist:

cd ~
sudo rm -rf jdk1.8.0_151
cd /usr/java
sudo rm -rf jdk1.8.0_151

(Pay extra attention to type these commands exactly like this.)

Then, we’ll put the .tar.gz in /usr/java:

sudo mv ~/Downloads/jdk-8u151-linux-arm32-vfp-hflt.tar.gz /usr/java/

(Assuming it’s in Downloads. If it’s in your home dir, the first part will be ~/jdk-8u151-linux-arm32-vfp-hflt.tar.gz)

Confirm that you now have the file jdk-8u151-linux-arm32-vfp-hflt.tar.gz in /usr/java and that you no longer have dirs named “jdk1.8.0_151” in /usr/java and in your home dir.

I moved it successfully I will follow your last post where I left

Wait. Now that it’s in the right dir, you have to unpack it:

cd /usr/java
sudo tar -xzf jdk-8u151-linux-arm32-vfp-hflt.tar.gz

When it’s done, you should finally have a “jdk1.8.0_151” subdir un /usr/java. Then, you can continue with the update-alternatives commands.

Can u send me the command sudo update-alternatives --install with the name im having some trouble
thanks :wink:

It’s the one I gave previously. First, check that you have a dir “jdk1.8.0_151” in /usr/java. If that’s ok:

sudo update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_151/bin/java 1000
sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_151/bin/javac 1000

And if you don’t have this dir, tell me what you have in /usr/java.

I dont see /usr/java in the caja ,but I see it on terminal lets continue and see what happens.

No, wait. Don’t type commands when you don’t know what the situation is. Give me the output of:

ls -l /usr/java

From Caja, you need to go to “Filesystem” to get to the root path (/). There, you should see usr and, inside, java.

total 79776
drwxr-xr-x 8 root root 4096 Jan 5 12:06 jdk1.8.0_151
-rw-rw-r-- 1 izayah izayah 81681158 Jan 5 11:29 jdk-8u151-linux-arm32-vfp-hflt.tar.gz
Thats what it gives me for the command u sent me.

found the files all good should I do the rest of the commands

Yeah, it looks good. You can run the two update-alternatives commands.

done should I start Minecraft or…

…do more commands?

Check that the right version of Java is used:

java -version

You’ll have to edit the run.sh script again to put the Oracle version back in it. I’m not 100% sure update-laternatives sets it in /usr/lib but give it a try: edit the script as it was before the change we made for OpenJDK and try to run it.

Java -version gave me

openjdk version “1.8.0_151”
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK Client VM (build 25.151-b12, mixed mode)

Its gives me the same error :confounded:

Yes, you’re still on OpenJDK. Try this again:

sudo update-alternatives --config java

Does it still offer you only OpenJDK? If Oracle is in the list, select it and try again to launch Minecraft.

EDIT: have you updated the run.sh script for it to use Java from Oracle? If it’s the case, even if OpenJDK is set for the system, Minecraft should use the Oracle version. And so, if it crashes in the same way, there must be a problem unrelated to Java.