Download the latest JAR file (bsh-xx.jar)
where java
C:\Program Files (x86)\Java\jdk1.6.0_32\bin\java.exe
C:\Windows\System32\java.exe
Unix:
export CLASSPATH=$CLASSPATH:bsh-xx.jar
Windows:
set classpath %classpath%;bsh-xx.jar
You can then run BeanShell in either:
// to run the graphical desktop
java bsh.Console
// or as text-only on the command line
java bsh.Interpreter
java bsh.Interpreter filename [ args ] // run script file
Example:
java bsh.Interpreter
BeanShell 2.0b4 - by Pat Niemeyer ([email protected])
bsh %
print ("HelloWorld");
HelloWorld