Maybe this might help the others.  For Windows batch file:
~~~~ Test.bat ~~~~~~~~~~~~~~~~~~~~~
rem;/*
    @echo off
    echo.
    java -cp bsh-2.0b4.jar bsh.Interpreter %0%
    goto :EOF
rem */
 
print("Hello World!");
frame(new Label("Hello World!"));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



I found this one in the BeanShell Manual. This is for Unix:
~~~~ Test.sh ~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
//bin/true; exec java -cp bsh-2.0b4.jar bsh.Interpreter "$0" "$@"

print("\nHello World!\n");
frame(new Label("Hello World!"));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


(Don't forget to edit the classpath with the correct path to the bsh jar)



On 04/10/06, Otan < ghostfighter@gmail.com> wrote:
In Unix, we can make an executable script by putting shebang at the beginning of the script. something like:
#!/bin/sh
or
#!/usr/bin/python
or
#!/usr/bin/ruby

is it possible to achieve such functionality through BeanShell? How can I do that?

Thanks.