Hi
I need to read the name of my computer from my bean. Does anyone know how to do it.
Thanks for any help in advance
Shiva
-
Getting the name of the computer (3 messages)
- Posted by: Shiva Ramadoss
- Posted on: February 22 2001 12:56 EST
Threaded Messages (3)
- Getting the name of the computer by sahil gupta on February 23 2001 11:03 EST
- Getting the name of the computer by Shiva Ramadoss on February 23 2001 13:54 EST
- Getting the name of the computer by rex rex on February 25 2001 01:06 EST
- Getting the name of the computer by Shiva Ramadoss on February 23 2001 13:54 EST
-
Getting the name of the computer[ Go to top ]
- Posted by: sahil gupta
- Posted on: February 23 2001 11:03 EST
- in response to Shiva Ramadoss
Use getRemoteHost method to get the computer name
BYE
Sahil -
Getting the name of the computer[ Go to top ]
- Posted by: Shiva Ramadoss
- Posted on: February 23 2001 13:54 EST
- in response to sahil gupta
Hi Sahil
Thanks, but which class does this function belong to..
Shiva -
Getting the name of the computer[ Go to top ]
- Posted by: rex rex
- Posted on: February 25 2001 13:06 EST
- in response to Shiva Ramadoss
import java.net.*;
public class shiva
{
public static void main(String a[])
{
try
{
InetAddress net=InetAddress.getLocalHost();
System.out.print(net.toString());
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
}
hope this will work,
rex(www.rexe.atfreeweb.com)