hey guys,
I was wondering if there is anyway that my java app could retrieve the computer name.

IE
My computer could be named "PhiberOptik-desktop" I want to retreive "PhiberOptik-desktop" !

Thanks PO.

Nevermind Figured it out!

import java.net.*;

class myName {

public static void main (String args[]) {

try {
InetAddress address = InetAddress.getLocalHost();
System.out.println("Hello. My name is " + address.getHostName());
}
catch (UnknownHostException e) {
System.out.println("I'm sorry. I don't know my own name.");
}

}

}