I know how to create a keyboard shortcut to launch an application. (All Settings->Keyboard->Shortcuts->Custom Shortcuts)

I know how to run .jar files from Nautilius. (Right click->Open with Oracle Java 7 Runtine)

But what I don't know is what command I must put in the "Custom Shortcuts" Command text box to run the .jar file, or what is the same, how run from the console a .jar file using Oracle Java 7 Runtine?


I've done this before with a shell script. I haven't tested it from a custom keyboard shortcut, but give it a shot once. This is what worked for me, and allows me to fire-up cassandra-gui by clicking on a shell script icon.

java -jar ~/cassandra-gui-0.8.0-beta1/cassandra-gui.jar

Basically, you invoke Java with the -jar option and give it the path of the jar file.

java -jar [path]/[filename].jar

You can use the following command:


The command above run a jar file at the user folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy