Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Computer name using java
02-28-2008, 07:06 PM
Post: #1
Computer name using java
How can I get the computer name using java?
Find all posts by this user
Quote this message in a reply
02-28-2008, 07:07 PM
Post: #2
RE: Computer name using java
Probably System.getProperties may help you.

Try System.getProperties("property name");
Find all posts by this user
Quote this message in a reply
02-28-2008, 07:11 PM
Post: #3
RE: Computer name using java
You can use java.net.InetAddress class for getting the computer name.

[java]
String computerName = InetAddress.getLocalHost().getHostName();
[/java]
Visit this user's website Find all posts by this user
Quote this message in a reply
08-16-2010, 12:13 PM (This post was last modified: 09-10-2010 08:41 PM by jeanlerye.)
Post: #4
RE: Computer name using java
I would probably suggest you try to check first with the java code program, I think this program might help you look for code. To access the computer name easier, you can try also using java.net.InetAddress class. This method might provide great assistance and a better specification for you.
Find all posts by this user
Quote this message in a reply
10-19-2010, 02:00 PM (This post was last modified: 10-19-2010 02:40 PM by ludovica.)
Post: #5
RE: Computer name using java
You can use java.net.InetAddress class to get the computer name. We can use getLocalHost() to get the local host first and then getHostName() method of InetAddress class.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)