ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rudolf Nottrott <rn...@alexandria.UCSB.edu>
Subject Re: task <java ...fork="true">: from which directory is the java command started
Date Fri, 23 Jan 2004 21:55:47 GMT
Thanks Antoine for the suggestion, but it doesn't seem to make a difference.

Basically, I need to make sure that the command

'java org.hsqldb.Server -database testxyz'

which is run by the ant target below, is started from the current 
directory, the directory in which the database files are.

How can I control the directory in which a  <java task gets started?  Is 
there a parameter for that?

Thanks,
Rudolf


At 08:53 AM 1/20/2004 +0100, you wrote:
>You probably want 2 arguments :
><arg value="-database"/>
><arg value="testxyz"/>
>
>Antoine

>Rudolf Nottrott wrote:
>
>>Hi,
>>
>>I have an Ant <java...> task that runs a database program named 
>>org.hsqldb.Server, see below.  The argument  to the Server is a database 
>>name, "-database testxyz".  The database testxyz.* is supposed to be 
>>taken from (or created in) the directory you were in when you issued the 
>>Java command that started the database Server.
>>Now, I didn't start Java -- I started Ant which started Java.
>>
>>Here is the task:
>><target name="hsqldb" description="Start the HSQLB sample database">
>>    <java classname="org.hsqldb.Server" fork="true" failonerror="true"
>>maxmemory="128m" >
>>       <arg value="-database testxyz"/>
>>       <classpath><pathelement 
>> location="${lib.home}/hsqldb.jar"/></classpath>
>>     </java>
>></target>
>>
>>The server starts up ok, but I'm not getting the database I want, 
>>testxyz, and so I'm trying to verify  the directory from which the Java 
>>command of task <java ...> was issued.
>>Any ideas on how trace this?  Is there perhaps some task like "print 
>>working directory" that I could run in conjunction with the <java ... > task?
>>


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


Mime
View raw message