ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurdoch...@yahoo.com>
Subject RE: Could not create JAVA virtual machine
Date Sat, 09 Feb 2002 03:24:12 GMT


> -----Original Message-----
> From: Zhendi Su [mailto:rachael.su@oracle.com]
> Sent: Saturday, 9 February 2002 12:48 PM
> To: ant-user@jakarta.apache.org
> Subject: Could not create JAVA virtual machine
> 
> 
> Hi,
> 
> I need to use the apply task to run a system command which precompiles
> jsp pages (kinda like weblogic).  When I run the command on the command
> line it was fine, but when I called it within Ant it told me "Could not
> create Java virtual machine."  Anybody ever had a similar error?
> 
> My task is implemented as follows:
> 
> <apply executable="/sh/bin" >
                     ^^^^^^^
/bin/sh maybe?

Maybe you should use executable="ojspc" instead, and let ant figure out if and how it should
spin up a shell:

<apply executable="ojspc"
  <arg value="-addclasspath"/>
  <arg path="${MY_PATH}"/>
  <arg value="-srcdir"/>
  <arg file="${SRC_DIR}"/>
  <arg value="-d"/>
  <arg file="classes"/>
  <fileset dir="my_dir"/>
</apply>

>  <arg line="ojspc -addclasspath ${MY_PATH} -srcdir=${SRC_DIR} -d
> classes" />
> <fileset dir="my_dir" />
> </apply>
> 
> Basically ojspc utility will precompiles files under my_dir into
> servlets and then compile the servlets into java classes.  If I typed
> ojspc -addclasspath ${MY_PATH} -srcdir=${SRC_DIR} -d classes my_dir
> 
> at the command line everything works fine.  But once I switched to ant,
> I get this "Could not create Java virtual machine" error.  Anyone knows
> what could be the reason?  Thanks a lot!
> 
> Zhendi Su
> 
> 


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


Mime
View raw message