• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to come to know on which operating system my application is running  RSS feed

 
ganesh pol
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am writing on class in which i need to know on which os my java application is running

can any one help me to solve this problem

 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the getProperty methods in the java.lang.System class.
[ May 19, 2006: Message edited by: marc weber ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getProperty(String key) method takes a key which returns the system property.
Can you kindly give some key values(like the one that retrieves the OS name).
 
fred Joly
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"os.name"
easy to guess no?
 
fred Joly
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
take a look at this :
System.getProperties().propertyNames();

Returns: an enumeration of all the keys in this property list, including the
keys in the default property list.
[ May 25, 2006: Message edited by: fred Joly ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you quick response fred jolly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!