You need the Bean Scripting Framework BSF from the Apache Jakarta project. It is what Ant uses to embed scripting languages.

http://jakarta.apache.org/bsf/

This is not part of bsh.

Conor


Robert Mark Bram wrote:
Hi All!

I have been looking at the Ant section of this page:
http://www.beanshell.org/manual/bsf.html#BSF_Bean_Scripting_Framework

I downloaded bsh-2.0b2.jar and put it in my CLASSPATH and in my ANT_HOME/lib dirs and saved the following to C:\temp\build.xml:
<project name="testbsh" default="runscript" basedir=".">
<target name="runscript">


        <!-- Run script in-line -->
        <script language="beanshell"><![CDATA[
            for(int i=0; i<10; i++ )
                print( "i="+i );
        ]]></script>

    </target>
</project>

Here is the result:

Total time: 0 seconds
C:\temp>echo %ANT_HOME%
C:\java\apache-ant-1.6.1

C:\temp>echo %CLASSPATH%
.;.;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1E


\lib;C:\WINDOWS\java\classes;.;E:\_originals\beanShell\bsh-2.0b2.jar

C:\temp>ant
Buildfile: build.xml

runscript:

BUILD FAILED
java.lang.NoClassDefFoundError: org/apache/bsf/BSFException

Total time: 0 seconds
C:\temp>


Does anyone have a clue as to what is going on here? Any advice would be appreciated!


Rob
:)



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to