--- "Payette, Don J" <[EMAIL PROTECTED]> wrote:

> Thanks, Ninju.  That works.
> 
> Would you happen to know if there is a property that
> is the name
> of the current jvm.   That way I could just do
> jvm="${JAVA_NAME}. 

You might be able to get by using
"${java.home}/bin/java" .  Otherwise, you could use
the script task to set a property to the value
returned from org.apache.tools.ant.util.JavaEnvUtils
  .getJreExecutable("java").

-Matt
> 
> 
> Don Payette
> 
> >THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
> OTHERWISE
> PROPRIETARY MATERIAL and is thus for use only by the
> intended recipient.
> If you received this in error, please contact the
> sender and delete the
> e-mail and its attachments from all computers.
> 
> -----Original Message-----
> From: Ninju Bohra [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 10, 2005 2:28 PM
> To: Ant Users List
> Subject: RE: IllegalAccessException
> 
> You may want to go back to the <java> task and
> provide
> a value for the jvm parameter so that you can start
> a
> java process.
> 
> Something like
>   <java jvm="/-/${JAVA_PACK}/OBJECT/JAVA"
>                .
>            (same as before)
>                .
>   </java>
> 
> The advantage of the <java> task over the <exec>
> task
> is that might take care of the command line
> quirkiness
> that you are running in it... or it won't
> 
> Just a suggestion
> --- "Payette, Don J" <[EMAIL PROTECTED]> wrote:
> 
> > Thanks, Keith.   I've rebuilt it using exec, and
> now
> > I get this:
> > 
> > -     % #1: (DONP)LIST/STDERR ON SYSTEM (Records:
> > 1-6 of 6)
> > 
> >  
> > 
> > BUILD FAILED
> > 
> >  
> > 
> > /-/JAVATEST2/DIR/DONP/SPEC/build.xml:407: Class
> > org.apache.tools.ant.types.Comma
> > ndline$Argument doesn't support the nested "arg"
> ele
> > 
> > ment
> > 
> >  
> > 
> > ----- End of (DONP)LIST/STDERR ON SYSTEM -----
> > 
> >  
> > 
> >  
> > 
> > And my build.xml has this:
> >     <exec
> executable="/-/${JAVA_PACK}/OBJECT/JAVA">
> >       <arg value="-cp"/>
> >       <arg
> value="${JDBC_CLASSPATH}:${CLASSPATH}"/>
> >       <arg
> > value="-Dspecjappserver.home=${JAS_HOME}"/>
> >       <arg value="${LoadPkg}.Load${Domain}">
> >       <arg value="${SCALE}"/>
> >     </exec>  
> > 
> > Does anyone know what this is all about?
> > 
> > Don Payette
> > 
> > >THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL
> AND/OR
> > OTHERWISE
> > PROPRIETARY MATERIAL and is thus for use only by
> the
> > intended recipient.
> > If you received this in error, please contact the
> > sender and delete the
> > e-mail and its attachments from all computers.
> > 
> > -----Original Message-----
> > From: Keith Hatton
> [mailto:[EMAIL PROTECTED]
> > 
> > Sent: Thursday, March 10, 2005 9:50 AM
> > To: Ant Users List
> > Subject: RE: IllegalAccessException
> > 
> > <exec>, though it might not work if your OS is
> > particularly obscure.
> > 
> > >> Remember, I'm new to ant.
> > Remember, There's a Fine Manual.
> > http://ant.apache.org/manual/index.html
> > 
> > 
> > 
> > -----Original Message-----
> > From: Payette, Don J
> [mailto:[EMAIL PROTECTED]
> > 
> > Sent: 10 March 2005 15:44
> > To: Ant Users List
> > Subject: RE: IllegalAccessException
> > 
> > 
> > Yes, the class is public.  Could it be that main
> is
> > static?  
> > 
> > This class is normally run from the command line,
> > ala:
> > 
> > c:>javaw.exe -cp <classpath> -DJAVA_HOME=C:\Java
> > org.spec.jappserver.load.LoadCorp 10"); 
> > 
> > Then the "main" argv parameter will have "10". 
> The
> > build.xml does the
> > following:
> > 
> >   <target name="_loaddb" depends="load">
> >     <property name="LoadPkg"
> > value="org.spec.jappserver.load"/>
> >     <property name="Domain" value="Ords"/>
> >     <java classname="${LoadPkg}.Load${Domain}"
> > fork="true">
> >       <jvmarg
> > value="-Dspecjappserver.home=${JAS_HOME}"/>
> >       <arg value="${SCALE}"/>
> >       <classpath>
> >         <pathelement path="${JDBC_CLASSPATH}"/>
> >         <pathelement path="${CLASSPATH}"/>
> >               <pathelement location="jars/load.jar"/>
> >       </classpath>
> >     </java>
> >   </target>
> > 
> > 
> > However, on my system, the <java> call fails
> because
> > it can't find java.
> > On our mainframe, java HAS to be run as a command
> > line, it can't be done
> > just as a class call.  So I changed it to
> > fork="false" so it uses the
> > JVM that ant is running under.  Now I'm getting
> the
> > current problem.
> > Apparently I need to do something like the
> > following.  Remember, I'm new
> > to ant.
> > :-)
> > 
> >     <runExe name="javaw.exe" 
> >         <arg value="-cp
> > ${JDBC_CLASSPATH}:${CLASSPATH}:jars/load.jar
> > -DJAVA_HOME=$(JAVA_HOME) ${LoadPkg}.Load${Domain}
> > ${SCALE}">
> >     </runExe>
> > 
> > 
> > Is there an ant action such as the one I invented
> > above - runExe? For
> > the line <property name="Domain" value="Ords"/>,
> > should I just do
> > -DDomain=Ords?
> > 
> > As an aside, does XML have a way to split wide
> > quoted strings onto two
> > or more lines?  Maybe something like
> >         <arg value="-cp
> > ${JDBC_CLASSPATH}:${CLASSPATH}:jars/load.jar " +
> > 
> >                    "-DJAVA_HOME=$(JAVA_HOME) " + 
> >                    "${LoadPkg}.Load${Domain}
> > ${SCALE}">
> > 
> > TIA,
> > Don Payette
> > 
> 
=== message truncated ===



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to