本文主要介绍Java中通过Runtime.getRuntime()和getHostName()获取主机名方法及示例代码。
原文地址:Java Runtime.getRuntime()和getHostName()获取主机名方法及使用代码