You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bjorn Martensson <bm...@amelia.co.uk> on 2001/02/01 12:17:41 UTC

Starting several VM:s

Hi,
I want to start a 3 stage server (3 java classes), but once the first server
class is started, ant seems to be suspended untill that server exits
(never).

Here's what the targets look like:

 <target name="fileServer">
    <echo message="Running the file server." />
    <java classname="examples.classServer.ClassFileServer"
classpath="${class path}"
	  fork="yes" dir="${package dir}">
      <arg line="2001 /Bjorn/bytecompiled"/>
    </java>
  </target>

  <target name="rmiJdbcServer" depends="fileServer">
    <echo message="Running the RMI JDBC server." />
    <java classname="RmiJdbc.RJJdbcServer" classpath="${class
path}/RmiJdbc.jar"
	  fork="yes" dir="${package dir}">
      <jvmarg value="-Djava.rmi.server.codebase=http://192.168.0.25:2001/"
/>
      <arg value="sun.jdbc.odbc.JdbcOdbcDriver" />
    </java>
  </target>

Has anyone had a similar problem or knows what I should do anyway?

Regards
Bjorn
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 2001-01-25


Re: Starting several VM:s

Posted by Stefan Bodewig <bo...@apache.org>.
Bjorn Martensson <bm...@amelia.co.uk> wrote:

> Hi, I want to start a 3 stage server (3 java classes), but once the
> first server class is started, ant seems to be suspended untill that
> server exits (never).
> 
> Has anyone had a similar problem or knows what I should do anyway?

Ant doesn't support asynchronous operation (yet). There is nothing
much you can do here apart from invoking a shell script that puts
itself into the background or running three instances of Ant in
parallel.

Stefan