ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <tim.gor...@allustra.com>
Subject RE: launch interpreter
Date Wed, 04 Jun 2003 09:06:06 GMT
I think you may be on to a hiding to nothing here

- ANT will wait for forked JVMs and Exec'd processes to complete before ANT
will contiunue with the next task
- Even if you had a Spawn task that would let the spawned process run async
how exactly are you going to maintain in input output streams to your
spawned process after the launching JVM exits? Have a good read of the
javadoc for java.lang.Process... You can only really get away with spawning
form ANT if your i/o doesn't come from console.

-----Original Message-----
From: Sebastien Blanc [mailto:Sebastien.Blanc@alcatel.com]
Sent: 04 June 2003 01:05
To: user@ant.apache.org
Subject: launch interpreter


Hello !
I'm trying to do a startup script with ANT that would launch the jython
prompt so that the user can launch jython methods when wanted.
I use the following:
<java classname="org.python.util.jython"
argline="-Dpython.home=${vendor.jython.home}
-Dpython.cachedir=${vendor.jython.cachedir}" >
             <classpath refid="process.run.classpath"/>
</java>
and get the following exception:
java.lang.NullPointerException
        at java.io.StringReader.<init>(StringReader.java:33)
        at org.apache.tools.ant.DefaultLogger.messageLogged(DefaultLogge

        at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.j

        at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2

        at org.apache.tools.ant.Project.log(Project.java:394)
        at org.apache.tools.ant.Task.log(Task.java:302)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:180)

        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
        at org.apache.tools.ant.Task.perform(Task.java:319)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)

        at org.apache.tools.ant.Project.executeTargets(Project.java:1250

        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
if I use fork="true", the jvm hangs and Ctrl+C triggers the prompt (but
then exit the ANT JVM).
is there a way to get the jython interpreter (scripting ? parallel ?).
I'd guess any interpreter launching would lead to the same issue (I know
that the DOS one for instance wd use exec but I don't see any portable
equivalent here).
thanx for help,
seb.


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


Mime
View raw message