Installing Minecraft on OpenSUSE 13.1

I am a recent convert to OpenSUSE, and so far, I am extremely satisfied. I have set up ATI proprietary drivers, oracle java, and now I want to do my favorite thing on any computer OS… PLAY MINECRAFT!

So… I downloaded the Minecraft.jar, made it executable, but clicking the icon just opens Ark, and running “java -jar Minecraft.jar” in a Terminal only returns:

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: 
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.14)
   at java.awt.Font.tk(libgcj.so.14)
   at java.awt.Font.getPeerFromToolkit(libgcj.so.14)
   at java.awt.Font.<init>(libgcj.so.14)
   at net.minecraft.bootstrap.Bootstrap.<clinit>(Bootstrap.java:30)
   at java.lang.Class.initializeClass(libgcj.so.14)
Caused by: java.lang.ClassNotFoundException: 
   at java.lang.Class.forName(libgcj.so.14)
   at java.awt.Toolkit.getDefaultToolkit(libgcj.so.14)
   ...5 moretion

Any suggestions, or guides to get this working would be greatly appreciated. I have scoured the net in hopes of finding a newbie guide, but nothing points to a useful solution.

  • MrNewf wrote, On 05/19/2014 04:36 PM:

> So… I downloaded the Minecraft.jar, made it executable, but clicking
> the icon just opens Ark,

Yes, your system thinks you want to find out what’s inside the jar. I created a short script launching it, that one can be clicked.

> and running “java -jar Minecraft.jar” in a
> Terminal only returns:
>
>
> Code:
> --------------------
> Exception in thread “main” java.awt.AWTError: Cannot load AWT toolkit:

Maybe you have an incompatible Java version installed. What does “java -version” say? Here’s mine, and it works:

java version “1.7.0_51”
OpenJDK Runtime Environment (IcedTea 2.4.4) (suse-24.13.5-x86_64)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Uwe

Ah great! I am in a similar boat having just installed openSUSE 13.1 (Gnome) on my dual-boot laptop and getting Minecraft installed is one of my goals.

I installed Java from Oracle (if my memory serves me right) and it should be version 1.7.0_60. I ran it based on the information I found here : http://www.unixmen.com/install-java-openususe-12-3-32/

Didn’t know about adding the “-jar” to the command line, I’ll have to give that a try.

Something mostly related, or at least a logical “next step”

How do I make a shortcut to run Minecraft once it is properly installed? I am running openSUSE 13.1 Gnome and currently when I want to run Minecraft I have to do 2 things:

  1. Hit Atl + F2
  2. Type java -jar Minecraft.jar
    (I have the Minecraft.jar file in the root of my /home directory)

With this method, it runs.

I have tried double-clicking the Minecraft.jar file and it opens in the archiver, but when I try and "Open with " Java I cannot find Java in the list of programs to select. Java was installed based on documentation found here (http://www.unixmen.com/install-java-openususe-12-3-32/)

I tried creating a script to run. I made the script in gEdit, and made it executable via chmod +x LaunchMinecraft successfully but when I double-click on it the script is opened in gEdit. The script code is pretty simple :

#!/bin/bash
java -jar /home/andrew/Minecraft.jar

and added the execute permissions with

chmod +x LaunchMinecraft

Any idea how to make a simple shortcut or launcher in Gnome to run Minecraft, whether it is a script in my /home directory or something in my favorites or even more integrated (with Gnome)?

I assume you associated bash scripts with an editor. In KDE, you can right click it, open with, find “bash” and tell it to remember the association.

HTH
Uwe

Getting the “shortcut” to work (the bash script) I had to make Nautilus (running Gnome) allow executing script files instead of just opening them. The other option is to ask each time.

Once I told it to run scripts then the shortcut method works just right.