MethadoneBoy
Feb 22nd, 2002, 04:34 AM
I'm using the import java.net.*; package to determine the name of the machine I'm using (I need it to set up a socket).
Here is my code:
private static String GetHost () throws IOException {
String MailHost;
MailHost = InetAddress.getHostName ();//.getLocalHost(). getHostAddress ();
return MailHost;
}
When this compiles I get a non-static context error. How can I fix this?
Mach appreciated! :)
Here is my code:
private static String GetHost () throws IOException {
String MailHost;
MailHost = InetAddress.getHostName ();//.getLocalHost(). getHostAddress ();
return MailHost;
}
When this compiles I get a non-static context error. How can I fix this?
Mach appreciated! :)