Ask Your Question
3

How to launch .jar file with OpenJDK?

asked 2013-11-21 07:20:44 -0500

Steven_0111 gravatar image

I am using Fedora 19, 64 bit with GNOME. I want to launch Minecraft and I have a 'minecraft.jar' file. I right-click, go to 'Properties', to 'Open With' but it doesn't show OpenJDK or Java. I've installed Java and OpenJDK (sudo yum install java*). I've set the program to execute as a program but I don't want to have to use the terminal everytime I have to run the .jar file.

Thank you!

edit retag flag offensive close merge delete

Comments

it was stuck for me at first but after little search : it's so easy ... just make sure you made the right path for your jdk from this link : https://fedoraproject.org/wiki/JDKonFedora then try to run app by openwith and type java -jar ... select bellow Remember application associate ...

HaDi gravatar imageHaDi ( 2017-04-19 15:01:16 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
4

answered 2013-11-21 09:29:46 -0500

nonamedotc gravatar image

updated 2013-11-22 11:50:12 -0500

You can perhaps create a launcher and include the following as command for that launcher.

java -jar /path/to/minecraft.jar

Hope that helps.


Edit

If you want to change it, try the following -

Open your favorite text editor and add the following

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=java -jar %f
Name=Java Jar
Comment=Opening Jar files

Save this file as, say, javajar.desktop and place it in one of the following locations

  • ~/.local/share/applications
  • /usr/share/applications
  • /usr/local/share/applications

Now, open a terminal and type the following

echo "application/x-java-archive=javajar.desktop" >> ~/.local/share/applications/mimeapps.list

This should let you open the java archive (jar) application correctly ...

Try this and post if you have problems

edit flag offensive delete link more

Comments

WAIT , when I am doing this , I cant place anything to that folder (applications)

estelaguerre gravatar imageestelaguerre ( 2013-12-29 06:45:46 -0500 )edit
0

answered 2014-08-30 13:39:09 -0500

Facebook gravatar image

updated 2014-08-30 13:45:09 -0500

Install CairoDock; it includes +launcher function. Before Gnome 3 a launcher was invoked by a right click on the desktop. Now we have a clean desktop. Cairo will provide a command line input box for /path/to/minecraft.jar as well as an icon select function. Once set up, just click on the icon in CairoDock and if the program runs in a terminal it will run from CairoDock. Lock the dock when you are happy with it or funny things may happen.

You may be able to use Gnome Advanced Settings to restore the built in launcher for the desktop but I get along well with Cairo.

edit flag offensive delete link more
0

answered 2013-11-21 14:55:33 -0500

Steven_0111 gravatar image

updated 2013-11-21 15:01:07 -0500

I know that but I'd prefer not to do that instead I want to associate .jar files with OpenJDK. And I have already tried the "Open With" method.

edit flag offensive delete link more

Comments

see my edited answer above.

nonamedotc gravatar imagenonamedotc ( 2013-11-22 11:49:45 -0500 )edit

Question Tools

Stats

Asked: 2013-11-21 07:20:44 -0500

Seen: 22,442 times

Last updated: Aug 30 '14