0

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.

user3771823
  • 157
  • 1
  • 1
  • 7

1 Answers1

0

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();

Reda
  • 1,277
  • 1
  • 13
  • 27