• Post Reply Bookmark Topic Watch Topic
  • New Topic

Anybody have any code which check which OS the JVM is running on?  RSS feed

 
Teddy Wang
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey folks, quick question. I've got a java app which needs to check which OS it's running under in order to make the appropriate OS related call. Does anybody have any sample code of how to do this?

Thanks!
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this link and look at the method "getProperties".

Kyle
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java In General(intermediate)...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!