ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Properties files are not properly loaded when testing class under junit task (possible bug)
Date Fri, 14 Nov 2003 13:18:10 GMT
On Tue, 11 Nov 2003, David Leal <achepati67@yahoo.es> wrote:

> I have detected that the junit task doesn't take into account a
> change on the variable user.language, for example on the invokation:

It does, as your own Syste.out output shows.  I think the problem is
in the ResourceBundle class (ot the classes supporting it).  If you
change the locale related system properties, this won't affect
ResourceBundle at all, much like changing java.class.path doesn't have
any effect on the classes your VM can load.

I fear you have to set your properties before you start a new VM (and
as a corrolary have to start a new VM whenever you want the change to
take any effect).  And then, I'm not sure whether user.language is the
property that get's consulted by ResourceBundle at all.

> ant -Duser.language=en

Sets an Ant property, not a Java system property.  For a system
property you have to use the ANT_OPTS environment variable.

Stefan

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


Mime
View raw message