I need to get the hostId of my server using a Java program. Is there something in the Java API that is built-in which can help me do this?
lab.com$ hostid
f9y7777j -> How can I get this using java
I need to get the hostId of my server using a Java program. Is there something in the Java API that is built-in which can help me do this?
lab.com$ hostid
f9y7777j -> How can I get this using java
Try the following code:
System.out.println(java.net.InetAddress.getLocalHost().getHostName());
The following would allow you to run a console command and store the result:-