What’s the Java Shebang for OS X? I just started using TextWrangler in place of Eclipse for writing Java programs. I found a script for testing Java programs in Terminal, but I’d like to handle everything right through TextWrangler. What’s the Java shebang for OS X? Or is there a Java shebang which is specifically for TextWrangler?
Here is a simple wrapper script that effectively can work as a Java shebang on OS X and Linux:

# /* ------- build and run wrapper script for Java -----------------------------
TMP=$(mktemp -d)
tail -c +3 ${0} &gt; ${TMP}/$(basename ${0})
cd ${TMP} &amp;&amp; javac $(basename ${0}) &amp;&amp; java $(basename ${0%.*}) ${@:1}
RV=${?} ; cd - &gt; /dev/null ; rm -rf ${TMP}
exit ${RV}
----------------------------------------------------------------------------- */

public class example {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}


However, as pointed out in the comments this is technically not a "shebang", but it comes pretty close in terms of functionality.