Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running in same VM

 
Thomas Murphy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi I am running a ant script that a runs java against a class that should create and reformat an xml document from an existing xml document. it returns this to screen:


the problem may lie with the classpath but i am not sure:



hope you can help
 
Thomas Murphy
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed this there.
i enabled the fork atttribute within the java call to make it run on a differenet jvm.


 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the processes that Ant invokes contain System.exit() calls. Since System.exit() halts the entire VM - including Ant itself, Ant only permits them to run forked into their own private VM.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Tim Holloway:
Some of the processes that Ant invokes contain System.exit() calls. Since System.exit() halts the entire VM - including Ant itself, Ant only permits them to run forked into their own private VM.


Does it? Do you have an example?

And how is this related to the original question? Seemed to me that it was a classpath problem caused by actually running in the Ant VM instead of its own one...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:


Does it? Do you have an example?

And how is this related to the original question? Seemed to me that it was a classpath problem caused by actually running in the Ant VM instead of its own one...


Well, actually, I read it in the official Ant docs IIRC. I don't remember the exact location - in fact, I'm half-sure that there are several culprits named, but I'm virtually certain one was the XSLT task.

It's not going to help, however that the manual I read this in was 1.6. The online docs are now 1.7 and many things have changed, including some of the external resources that Ant was using to do its work.
[ February 07, 2007: Message edited by: Tim Holloway ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just found out that the javadoc task is one of the culprits.

I still don't see the connection to the original question, though...
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bingo. JavaDoc it is. The XSLT task has used several different processors and I couldn't remember if any of them had constraints on them, but figured it was worth mentioning.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic