ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Changing Working Directory to get tests to work
Date Tue, 06 Aug 2002 06:56:45 GMT
On Mon, 5 Aug 2002, <jlcarpenter@household.com> wrote:

> I can't seem to change this, so I would like to know how to have
> java change its working directory during runtime.

In most VMs you can't (rumors are that Apple's VM can do so by
changing the system property user.dir).

> I can then write a wrapper to the junit runner that fixes the
> problem.

Don't use the junit runner of VAJ but run your tests using Ant's
run-tests target.

> Does anyone know how a java program can change its working
> directory?

You really cannot do that without forking a new VM (this is what Ant
does for <java>'s dir attribute).

Stefan

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


Mime
View raw message