BeanShell
Steps
Download
Download the latest JAR file (bsh-xx.jar)
Configure it
As a java extension
- Add the jar in the folder JAVA_HOME/jre/lib/ext
where java
C:\Program Files (x86)\Java\jdk1.6.0_32\bin\java.exe
C:\Windows\System32\java.exe
by extending the Classpath environment variable
Unix:
export CLASSPATH=$CLASSPATH:bsh-xx.jar
Windows:
set classpath %classpath%;bsh-xx.jar
Start it
You can then run BeanShell in either:
- a GUI (double click the jar file)
- or console. Interactive Mode.
// to run the graphical desktop
java bsh.Console
// or as text-only on the command line
java bsh.Interpreter
- or file. Batch Mode.
java bsh.Interpreter filename [ args ] // run script file
Example:
java bsh.Interpreter
BeanShell 2.0b4 - by Pat Niemeyer ([email protected])
bsh %
Run it
print ("HelloWorld");
HelloWorld