Hi,
I try a sample task that run jacl scripts with ant
<project name="script01" default="hello">
<target name="hello">
<script language="jacl"> <![CDATA[
package require java
puts [[java::new String "hello world"] toString]
]]></script>
</target>
</project>
but I get some error
Buildfile: test_s.xml
hello:
Exception in thread "main" [script] java.lang.NullPointerException
[script] at tcl.lang.Interp.create(Native Method)
[script] at tcl.lang.Interp.<init>(Interp.java:130)
[script] at
com.ibm.bsf.engines.jacl.JaclEngine.initialize(JaclEngine.jav
a:31)
[script] at
com.ibm.bsf.BSFManager.loadScriptingEngine(BSFManager.java:31
7)
[script] at com.ibm.bsf.BSFManager.exec(BSFManager.java:478)
[script] at
org.apache.tools.ant.taskdefs.optional.Script.execute(Script.
java:109)
[script] at org.apache.tools.ant.Task.perform(Task.java:217)
[script] at org.apache.tools.ant.Target.execute(Target.java:184)
[script] at org.apache.tools.ant.Target.performTasks(Target.java:202)
[script] at
org.apache.tools.ant.Project.executeTarget(Project.java:601)
[script] at
org.apache.tools.ant.Project.executeTargets(Project.java:560)
[script] at org.apache.tools.ant.Main.runBuild(Main.java:454)
[script] at org.apache.tools.ant.Main.start(Main.java:153)
[script] at org.apache.tools.ant.Main.main(Main.java:176)
BUILD FAILED
c:\ant_test\test_s.xml:3: tcl.lang.TclRuntimeError: could not find class
java/la
ng/Object.
Check that your path includes the directory where tclblend.dll resides.
Try looking in the directories under the value of tcl_library,
same line run ok from a tclsh
%package require java
1.2.6
%puts [[java::new String "hello world"] toString]
hello world
I run ant 1.41 with jacl 1.26 tcl 8.3.3
I add the following jars to the jakarta-ant-1.4.1 lib dir:
jacl.jar
tcljava.jar
bsf.jar
jakarta-ant-1.4.1-optional.jar
is any one know what I do wrong ??
regards zacky
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>