ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koegel, Michael" <Michael.Koe...@partner.commerzbank.com>
Subject AW: run jacl scripts with ant
Date Wed, 24 Apr 2002 07:20:19 GMT
Hi,

I'm also using jacl and your target runs fine on my machine.
The only difference I could find is that I got jacl.jar and bsf.jar 
on my CLASSPATH and not in $ANT_HOME/lib.

I run on NT4.

Regards,
 Michael

-----Urspr√ľngliche Nachricht-----
Von: Azoulay, Zacky [mailto:zacky.azoulay@sapportals.com]
Gesendet am: Dienstag, 23. April 2002 19:57
An: 'ant-user@jakarta.apache.org'
Betreff: run jacl scripts with ant

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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message