How do I programmatically determine operating system in Java?

Posted by KG on Stack Overflow See other posts from Stack Overflow or by KG
Published on 2008-10-23T03:47:05Z Indexed on 2010/05/27 0:21 UTC
Read the original article Hit count: 514

Filed under:

I would like to determine the operating system of the host that my Java program is running programmatically (for example: I would like to be able to load different properties based on whether I am on a Windows or Unix platform). What is the safest way to do this with 100% reliability?

© Stack Overflow or respective owner

Related posts about java