Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 2 down vote accepted

you can run jar files using this command:

java -jar NameOfJar.jar
share|improve this answer
1  
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
add comment

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
add comment

Your Answer

 
discard

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.