General discussion
August 5, 2022 at 06:57 AM
pipes-pigeon0l

How do I programmatically determine operating system in Java?

by pipes-pigeon0l . Updated 4 years ago

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?

This discussion is locked

All Comments