Is there a way to get the same thing returned by system.environment.machinename
in c# -- but in java?
I've tried InetAddress.getLocalHost().getHostName();
and using the JCIFS open source library.
Is there a way to get the same thing returned by system.environment.machinename
in c# -- but in java?
I've tried InetAddress.getLocalHost().getHostName();
and using the JCIFS open source library.
Did you try when using the JCIFS?
InetAddress addr = InetAddress.getByName("127.0.0.1");
String host = addr.getHostName();
What did you get when you tried
InetAddress.getLocalHost().getHostName();