Creating shortcut using Java to execute

New to Debian (Or Linux in general)? Ask your questions here!

Creating shortcut using Java to execute

Postby geobeck » 2018-04-01 21:35

This is specific to running Minecraft, but it probably applies to other Java apps packaged as Java archives (jar).

I've got the .jar file in my downloads folder, made executable with a script to run it using java -jar. I can run the program by double-clicking it in the folder, but when I create a desktop or menu link, it won't run. I'm guessing the link is trying to execute the .jar either without using the -jar argument, or without using Java.

How do I create a link that executes the file using the java -jar script?
geobeck
 
Posts: 7
Joined: 2018-03-25 16:28
Location: Edmonton, Canada

Re: Creating shortcut using Java to execute

Postby debiman » 2018-04-02 12:25

how did you create the .desktop file (there's no .lnk in linux)?
can you post its contents?
User avatar
debiman
 
Posts: 2785
Joined: 2013-03-12 07:18

Re: Creating shortcut using Java to execute

Postby geobeck » 2018-04-02 14:29

I used the "Create new launcher here" option on the desktop context menu.

I've created a workaround; I simply copied the .jar file to the desktop.
geobeck
 
Posts: 7
Joined: 2018-03-25 16:28
Location: Edmonton, Canada


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable