Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法让system.environment.machinenamec# 返回相同的东西——但是在 java 中?
system.environment.machinename
我已经尝试InetAddress.getLocalHost().getHostName();并使用了 JCIFS 开源库。
InetAddress.getLocalHost().getHostName();
您在使用 JCIFS 时是否尝试过?
InetAddress addr = InetAddress.getByName("127.0.0.1"); String host = addr.getHostName();
当你尝试时你得到了什么