Mar 22, 2004 #1 hemajb Programmer Joined Sep 26, 2003 Messages 19 Location IN How do we find out the Operating system using java coding. can anybody help me on this its quiet urgent..
How do we find out the Operating system using java coding. can anybody help me on this its quiet urgent..
Mar 23, 2004 #2 sedj Programmer Joined Aug 6, 2002 Messages 5,610 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)); } Upvote 0 Downvote
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)); }
Mar 23, 2004 Thread starter #3 hemajb Programmer Joined Sep 26, 2003 Messages 19 Location IN Thanks , i just released after posting the question.. Thanks again sedj Upvote 0 Downvote