Ask Your Question

Installing JAVA and running .jar files

asked 2017-01-25 10:30:30 -0500

codecrawl gravatar image

updated 2017-01-30 11:51:54 -0500

hhlp gravatar image

Hi everyone,

I'm having trouble with my java install and running .jar programs. I was able to run it the other day but now it seems broken and I dont know what happened or how to fix it. One of the programs I'm trying to run is OSBuddy.jar. Like I said i managed to get it working a few days ago then today i went to run it with java -jar OSBuddy.jar and this is my error messages and jave version.

bash-4.3$ java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-b16)
OpenJDK 64-Bit Server VM (build 25.111-b16, mixed mode)
bash-4.3$ java -jar OSBuddy.jar
Error: Unable to access jarfile OSBuddy.jar

any help in fixing my java version or getting this program to run (perhaps even as a click-able icon so I don't have to use the terminal to open it) - or even other .jar files - I would greatly appreciate it.

edit retag flag offensive close merge delete


It seems like it can't find the .jar file OSBuddy.jar. Please run the ls -l command to list all files in the current working directory and check if the file is there. Also, be sure the command pwd outputs the correct directory where you have saved your .jar file.

elsaso gravatar imageelsaso ( 2017-01-25 10:55:52 -0500 )edit

No protocol specified Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.

codecrawl gravatar imagecodecrawl ( 2017-01-25 11:45:17 -0500 )edit

at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$200( at sun.awt.X11GraphicsEnvironment$ at Method) at sun.awt.X11GraphicsEnvironment.<clinit>( at java.lang.Class.forName0(Native Method) at java.lang.Class.forName( at java.awt.GraphicsEnvironment.createGE( at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(

codecrawl gravatar imagecodecrawl ( 2017-01-25 11:45:44 -0500 )edit

the above two comments are the code I got from running the java -jar command after locating the correct directory which was /home/noah/Downloads/OSBuddy.jar

its in two comments because fedora was saying that it was forbidden for me to have it all in one.

codecrawl gravatar imagecodecrawl ( 2017-01-25 11:47:29 -0500 )edit

Are you running Fedora 25? Using Wayland? If answer to both question is yes, try logging into Gnome (?) using a Xorg/X-server session.

florian gravatar imageflorian ( 2017-01-25 12:03:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-12 20:49:57 -0500

codecrawl gravatar image

At the login screen, after you click on your name, but before you enter the password, there is a little gear icon. Click on that and choose the Gnome on Xorg option. Then enter your password.

Answered by Samual Sieb

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-01-25 10:30:30 -0500

Seen: 1,647 times

Last updated: Feb 12 '17