Find physical machine name in Java
java
Solution
String computername=InetAddress.getLocalHost().getHostName();
System.out.println(computername);
Problem
How can I obtain the physical machine name that my jvm is running in? (Physical = OS, up to vmware...) Added from poster's comment: I mean the name of the computer the JVM is running in. Most likely a physical computer, but if the JVM is running inside another virtual machine then that name is good.