I'm currently part of a team designing a certain Java application; my part was coding a file called GUI.java, with which the entire program is launched. Now, it works fine when I launch it through Eclipse, but I would like to change it so that it can launched simply by clicking a desktop icon.

Can this be done with Eclipse? I've tried to use its "export" functionality to create a .jar, but I can only execute that by opening a command prompt and typing java -jar GUI.jar...

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)

PW

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.shwork 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.