aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Running in same VM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Running in same VM " Watch "Running in same VM " New topic
Author

Running in same VM

Thomas Murphy
Greenhorn

Joined: Dec 14, 2006
Posts: 23
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

Joined: Dec 14, 2006
Posts: 23
Fixed this there.
i enabled the fork atttribute within the java call to make it run on a differenet jvm.


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15624
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
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...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15624
    
  15

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

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Jun 25, 2001
Posts: 15624
    
  15

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running in same VM
 
Similar Threads
HOW TO COMPILE JAVA FILES PROGAMMATICALLY
war from ant not running
CLASSPATH Help With ANT
Help: Modern compiler is not available.
[junit] java.lang.ClassNotFoundException: UserActivityTest