Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do we find out the OS using java

Status
Not open for further replies.

hemajb

Programmer
Sep 26, 2003
19
IN
How do we find out the Operating system using java coding. can anybody help me on this its quiet urgent..
 
You want System.getProperty("os.name");

This is how you get all available System properties :

Code:
     for (Enumeration e = System.getProperties().propertyNames() ; e.hasMoreElements() ;) {
		 String propName = (String)e.nextElement();
         System.out.println(propName +"=" +System.getProperty(propName));
     }
 
Thanks ,

i just released after posting the question..
Thanks again sedj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top