ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@mad.scientist.com>
Subject Working Directory Woes ... or Not ?
Date Wed, 05 Jul 2000 02:33:38 GMT
Hi,

Can someone point out where my stupidity lies here :P. I was under the
impression that working directory was impossible to set in java. However
recently I have been playing with
System.setProperty("user.dir","someotherdirectory") and everything seems to
work !!! hmmm The only problems occured when I used relative paths. So what
I did at the begining of my program was resolve any relative paths to
absolute paths. This means you have to resolve some system properties (ie 
"java.class.path") and also some internal paths inside the program. 

So all my tests seem to work but I have always been under impression this
is impossible and have had several knowledgable people preach at me that it
was impossible. So have I missed something ????

If I haven't missed anything this could be implemented in ant no ? Then we
would no longer have to set ant home because everything could be done via
class-loaders and this no ? (Except for rare occasions when need to change
security manager, connection factory or whatever multiple times for
different tasks).


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message