2016-04-29から1日間の記事一覧
InetAddress.getLocalHost().getHostName() と Runtime.getRuntime().exec("hostname") のどちらでも取得出来るが、 InetAddress.getLocalHost().getHostName() の方が環境が変わっても正しく動く可能性が高い。 参考: stackoverflow.com
InetAddress.getLocalHost().getHostName() と Runtime.getRuntime().exec("hostname") のどちらでも取得出来るが、 InetAddress.getLocalHost().getHostName() の方が環境が変わっても正しく動く可能性が高い。 参考: stackoverflow.com