Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 5416  / 3 Years ago, sun, may 2, 2021, 7:01:28

I have programed a java program. To run it I write java -jar /path/name.jar in the Terminal. I have made a script (.sh) which installs the program on the system. I want the script to create a shortcut to the Java program in both the desktop and the Launcher.



Anyone who know how to do it?


More From » shortcuts

 Answers
7

Launcher apps are in /usr/share/applications. I would create a .desktop file in that folder.



[Desktop Entry]
Name=My App Name
Exec=/path/to/java -jar /path/name.jar
Terminal=false
Type=Application
Icon=/path/to/my/icon.png
Categories=

[#32970] Monday, May 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
learty

Total Points: 432
Total Questions: 115
Total Answers: 109

Location: Wallis and Futuna
Member since Tue, Mar 30, 2021
3 Years ago
learty questions
Sat, May 21, 22, 15:30, 2 Years ago
Sun, Jan 9, 22, 22:31, 2 Years ago
Mon, Jul 4, 22, 11:31, 2 Years ago
Tue, Mar 22, 22, 16:28, 2 Years ago
;