Getting hostname with java fails in latest jdk7

前端 未结 4 1665
别那么骄傲
别那么骄傲 2021-02-14 07:43

I\'ve been getting hostname of the machine as follows:

InetAddress.getLocalHost().getHostName();

However, when I put latest JDK (jdk1.7.0_04),

4条回答
提交回复
热议问题