Ask Your Question
0

Error installing Minecraft on Fedora22

asked 2015-05-30 21:26:35 -0500

Falcon2_0 gravatar image

When I run the command java -jar Minecraft.jar I get this error

Exception in thread "main" java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
    at java.awt.Window.<init>(Window.java:536)
    at java.awt.Frame.<init>(Frame.java:420)
    at javax.swing.JFrame.<init>(JFrame.java:233)
    at net.minecraft.bootstrap.Bootstrap.<init>(Bootstrap.java:45)
    at net.minecraft.bootstrap.Bootstrap.main(Bootstrap.java:378)

and java -version returns

openjdk version "1.8.0_45"
OpenJDK Runtime Environment (build 1.8.0_45-b13)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)
edit retag flag offensive close merge delete

Comments

try install it:

su
dnf -y install libXrandr libXtst
davidva gravatar imagedavidva ( 2015-05-31 01:27:45 -0500 )edit

The exception you are experiencing is described here. The problem is that Java believes you are attempting to run code which depends upon a mouse, keyboard, or display being available and one is not.

One major thing to note: On the Minecraft website, it is stated: "Download Minecraft.jar (86 KB). The jar is executable and should work as-is, also please use Oracle's JVM." ( https://minecraft.net/download ). That said, my Fedora 21 system is using the OpenJDK just like yours and it works without issue.

bitwiseoperator gravatar imagebitwiseoperator ( 2015-05-31 08:13:37 -0500 )edit

If you execute yum list installed java*, do you see that you have both the java-1.8.0-openjdk.x86_64 package and the java-1.8.0-openjdk-headless.x86_64 package installed? 'Cause if you have only the latter, that might be the source of the trouble.

bitwiseoperator gravatar imagebitwiseoperator ( 2015-05-31 08:15:29 -0500 )edit

@bitwiseoperator I have my main screen turned off in settings, as half of the time it doesn't work. I think that might be why it throws the HeadlessException. I also have the openjdk headless and the regular open jdk installed.

Falcon2_0 gravatar imageFalcon2_0 ( 2015-05-31 09:57:41 -0500 )edit

start it using java -Xms1G -Xmx1G -jar minecraft.jar nogui

RealPlayerCraft gravatar imageRealPlayerCraft ( 2016-06-02 05:49:37 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-05-31 10:58:32 -0500

Falcon2_0 gravatar image

I fixed it. All I had to do was run sudo dnf install java-1.8.0-openjdk-devel

edit flag offensive delete link more
2

answered 2015-12-21 22:25:40 -0500

Gregor gravatar image

The headless java is installed by default. You need to install the full (GUI) version:

dnf install java-1.8.0-openjdk

The devel packages (mentioned in your answer) are not required for minecraft.

edit flag offensive delete link more

Comments

The java-1.8.0-openjdk package was the final resolution in my case for this error message. . Thanks so much. I only wish this tip was closer to the top :) Resolved for FC23.

KrossFaxz gravatar imageKrossFaxz ( 2016-05-13 19:41:41 -0500 )edit

Worked for FC28 as well. Thanks!

Brownov gravatar imageBrownov ( 2018-05-11 15:43:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-05-30 21:26:35 -0500

Seen: 7,944 times

Last updated: Dec 21 '15