Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get system Hostname in java

807606Feb 13 2007 — edited Feb 13 2007
Hi,

I am a java developer trying to get the hostname of the system from java class. Meaning want the value when i run the $hostname command in linux and my server is Linux server.

I am searching in the System Properties for the hostname but i could not get it

I am running IBM Websphere 5.2 and JDK 1.4.2 in my linux server.

Thanks for input

-AP
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2007
Added on Feb 13 2007
3 comments
6,124 views