Home | Back | Contents | Next |
import com.ibm.bsf.*; // register beanshell with the BSF framework String [] extensions = { "bsh" }; BSFManager.registerScriptingEngine( "beanshell", "bsh.util.BeanShellBSFEngine", extensions ); |
<project name="testbsh" default="runscript" basedir="."> <target name="runscript"> <!-- Run script from a file --> <script language="beanshell" src="myscript.bsh"/> <!-- Run script in-line --> <script language="beanshell"><![CDATA[ for(int i=0; i<10; i++ ) print( "i="+i ); ]]></script> </target> </project> |
Home | Back | Contents | Next |