|Re: Creating an executable icon [message #675405 is a reply to message #672241]
||Tue, 31 May 2011 12:33
Registered: July 2010
Paul Webster wrote on Fri, 20 May 2011 08:43|
It works the same way on linux. Associating "java -jar" with .jar files will launch the jar with java on any double-click (desktop or system file browser)
Wouldn't that work only on my machine, though? I need it to also work for clients who download the thing...
Anyway, tried a different approach: Created a shell script "script.sh" that executed the .jar, then created a desktop launcher designed to execute script.sh; this worked fine, except for one problem: its command was "/home/omaler/[...]/script.sh"; in other words, it was designed to work with the folder hierarchy specific to my machine. So I tried instead to make it more universal, by making it execute the script found in the same folder (rather than giving it an absolute path):
command: $(dirname %k)/script.sh
work path: ./
While it did launch the program...It encountered execution errors I never had while launching it with Eclipse or with the previous launcher. No idea how that's even possible.
So, I tried to obtain more data on the error by going into the launcher's advanced options, and checking the "run in terminal" option. But then, when I tried to run it and it opened a terminal...the only message it printed was that it couldn't find the .jar file. I tried checking the "run in terminal" option with the other launcher (the one using an absolute path, which worked just fine), and got the same error.
I'm...stumped. Maybe it's my ignorance of Linux launchers, but I don't understand where these errors could come from.
Powered by FUDForum
. Page generated in 0.12757 seconds