Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 5417  / 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
;