Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Creating shortcut using Java to execute

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
geobeck
Posts: 14
Joined: 2018-03-25 16:28
Location: Edmonton, Canada

Creating shortcut using Java to execute

#1 Post by geobeck »

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?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Creating shortcut using Java to execute

#2 Post by debiman »

how did you create the .desktop file (there's no .lnk in linux)?
can you post its contents?

geobeck
Posts: 14
Joined: 2018-03-25 16:28
Location: Edmonton, Canada

Re: Creating shortcut using Java to execute

#3 Post by geobeck »

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.

Post Reply