ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Kuß <mk...@asdis.de>
Subject Re: Localhost name
Date Thu, 12 Dec 2002 16:46:45 GMT
Vilya Harvey wrote:
> Where I work, we couldn't find a way to do this. So we implemented our own
> task to do it for us. The implementation itself was trivial (just call
> InetAddress.getLocalHost().getHostName() in the execute() method and store
> it in a user-specified property), but I can see about making it available if
> you (or anyone else) is interested.

Sounds interesting. But keep in mind that on machines using multiple
hostnames/ip java will only return one (IMHO on Linux it's the first 
entry in the /etc/hosts). That can result in some problems
you cannot track down easily.
It's quite ok to do it that way (I don't have any other idea), but it's 
always good to keep the traps in mind.

Micha







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


Mime
View raw message