Hi, I didn't work with actually what you are working with, but check out the Path or JAVA_HOME environment variable set properly, so that it points correctly to the java working directory.(so that %JAVA_HOME%\bin directory is in your path at runtime.
If this works mail me back, otherwise I am sorry, you need to find another solution. Srinivas. -----Original Message----- From: Adam Murdoch [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 09, 2002 8:54 AM To: Ant Users List Subject: RE: Could not create JAVA virtual machine > -----Original Message----- > From: Zhendi Su [mailto:[EMAIL PROTECTED]] > Sent: Saturday, 9 February 2002 12:48 PM > To: [EMAIL PROTECTED] > 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
