We can get the computer name by the java code program.
For getting computer name we have used java.net.InetAddress class. We
will use static method getLocalHost() for fetching the localhost
and after having localhost we will be able to have host name by using getHostName()
method of InetAddress class.
Here is the full example code of GetComputerName.java as follows:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: October 23, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles