| Very Bad use of Ant... | Very Bad use of Ant... 2006-08-28 - By Dan McFadyen
No idea, but.. Straight from the command prompt on my other screen: .... [java] [java] The ' characters around the executable and arguments are [java] not part of the command. [java] Setting environment variable: JAVA_HOME=C:\jdk1.5.0_07 [java] Buildfile: build.xml ....
.... [java] com.sun.tools.javac.Main is not on the classpath. [java] Perhaps JAVA_HOME does not point to the JDK ....
And that's as far as I have gotten...
-----Original Message----- From: Scot P. Floess [mailto:floess@(protected)] Sent: Monday, August 28, 2006 4:52 PM To: Ant Users List Subject: Re: Very Bad use of Ant...
Could it be it's finding the JRE versus the JDK (or SDK)...
Dan McFadyen wrote: > Funny, I spoke too soon. > > This lovely new forked and running JVM with it's new ant doesn't seem to be > able to find javac to compile... all the environment variables exist on the > outer JVM, but I am rather stumped. > > I have failed my attempts to toss the environment variables into the new JVM > using the combination of: > > <property environment="env"/> > and > <env key="JAVA_HOME" value="${env.JAVA_HOME}"/> > > I'd be more than happy if someone could point out my mistake. > > Dan > > -----Original Message----- > From: Dan McFadyen [mailto:danm@(protected)] > Sent: Monday, August 28, 2006 3:08 PM > To: Ant Users List > Subject: RE: Very Bad use of Ant... > > > Hey hey! > > I found the stuff I needed after some googling and some of the info from the > first reply, just getting back now and you've made me slightly curious about > what possible side effects would happen without the ant.home as I made it > work without it... Mind you, I am using only to do one small thing so I > might not have noticed it. > > Thanks! > > Dan > > -----Original Message----- > From: Darick Jarvis [mailto:djarvis@(protected)] > Sent: Monday, August 28, 2006 2:58 PM > To: 'Ant Users List' > Subject: RE: Very Bad use of Ant... > > > > > I don't know if this is the official way to call ant within a java task, but > it works for me. Maybe this can help you. This will cause it to outlive > the starting script with no handle to it though. > > <java classname="org.apache.tools.ant.launch.Launcher" > dir="." > fork="true" > newenvironment="true" > spawn="true" > maxmemory="WHATEVER" > taskname="WHATEVER"> > <classpath> > <fileset dir="PATH_TO_ANT_LIBRARY" casesensitive="false"> > <include name="*.jar" /> > <include name="*.zip" /> > </fileset> > </classpath> > <arg value="-f" /> > <arg value="FILE_TO_RUN" /> > <arg value="-Dant.home=PATH_TO_ANT_HOME" /> > <arg value="TARGET_TO_RUN" /> > </java> > > Note, it is important to set the ant.home property for it to run correctly > > Hope this helps! > > > -----Original Message----- > From: Dominique Devienne [mailto:ddevienne@(protected)] > Sent: Monday, August 28, 2006 2:17 PM > To: Ant Users List > Subject: Re: Very Bad use of Ant... > > You can always <java fork="true"> the other Ant, and since they live > in different processes and VMs, they can co-exist peacefully. I think > there's an example somewhere that demonstrates how to call Ant using > <java>. --DD > > On 8/28/06, Dan McFadyen <danm@(protected)> wrote: > >> Hello, >> >> I am about to ask how to do something that will sound... very very ugly... >> >> Is there anyway to run a different version of Ant from within an Ant >> > script? > >> I read the faq and found the explantation of the: >> >> [exec] java.lang.NoClassDefFoundError: >> org/apache/tools/ant/launch/Launcher >> [exec] Exception in thread "main" >> >> I have gone to the 2 different directories I need to run it, and I can run >> each fine (one defined in Env variables, other using absolute path to bin >> dir). >> >> But... is there any way to not get that?... Or am I stuck with a manual >> > step > >> if I need 2 versions of Ant to play nice? >> >> >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@(protected) > For additional commands, e-mail: user-help@(protected) > > >
-- Scot P. Floess 27 Lake Royale Louisburg, NC 27549
252-478-8087 (Home) 919-754-4592 (Work)
Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |