Getting the name of the computer

Discussions

EJB programming & troubleshooting: Getting the name of the computer

  1. Getting the name of the computer (3 messages)

    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

    Threaded Messages (3)

  2. Getting the name of the computer[ Go to top ]

    Use getRemoteHost method to get the computer name
    BYE
    Sahil
  3. Getting the name of the computer[ Go to top ]

    Hi Sahil

    Thanks, but which class does this function belong to..

    Shiva
  4. Getting the name of the computer[ Go to top ]

    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)