Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I downloaded Tomighty(pomodoro app) on my Ubuntu 12.04. Everytime i have to start tomighty, i have to right click on the tomighty's jar file and click on open with sun java 7.

is there any command which i can save and just double clicking on it or adding it at startup execute it.

share|improve this question
up vote 2 down vote accepted

you can run jar files using this command:

java -jar NameOfJar.jar
share|improve this answer
To make a clickable desktop entry, I'd recommend to use the menu editor named alacarte. With that you can easily put any command in Ubuntus menus, and from there you can simply drag and drop it to your desktop, if you like. When creating a menu entry, you might need to specify the full path to the jar file and maybe enclose it in quotation marks. – soulsource Jul 8 '13 at 16:42

Right click the .jar file, click on Properties. In the Open With tab you can choose the default application. Choose Sun Java 7.

Now you should be able to just double click it.

Properties - Open With

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.