Equivalent of double-clickable .sh and .bat on Mac?

Epaga picture Epaga · Feb 26, 2009 · Viewed 41.8k times · Source

I am distributing a Java program where I want a double-clickable file to run

java -cp MyProgram.jar;MyLib.jar my.program.Main

On Windows I simply distribute a .bat file, for *nix an executable .sh file. Problem is, double-clicking the .sh file just opens it up in a text editor on Mac. What should I do for Mac?

Answer

mouviciel picture mouviciel · Feb 26, 2009

On mac, there is a specific extension for executing shell scripts by double clicking them: this is .command.