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 propertie
In com.sun.jna.Platform class you can find useful static methods like
Platform.isWindows();
Platform.is64Bit();
Platform.isIntel();
Platform.isARM();
and much more.
If you use Maven just add dependency
net.java.dev.jna
jna
5.2.0
Otherwise just find jna library jar file (ex. jna-5.2.0.jar) and add it to classpath.