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:
When this compiles I get a non-static context error. How can I fix this?Code:private static String GetHost () throws IOException { String MailHost; MailHost = InetAddress.getHostName ();//.getLocalHost(). getHostAddress (); return MailHost; }
Mach appreciated!![]()


Reply With Quote