0

有没有办法让system.environment.machinenamec# 返回相同的东西——但是在 java 中?

我已经尝试InetAddress.getLocalHost().getHostName();并使用了 JCIFS 开源库。

4

1 回答 1

0

您在使用 JCIFS 时是否尝试过?

InetAddress addr = InetAddress.getByName("127.0.0.1");
String host = addr.getHostName();

当你尝试时你得到了什么

InetAddress.getLocalHost().getHostName();

于 2014-06-25T13:29:51.947 回答