How to find the OS (Windows or Unix)?
843798Sep 16 2003 — edited Nov 10 2003
In Java, is there any programmatic way of finding if an OS is Windows or Unix? I know of the following method:
String osName = System.getProperty( "os.name" );
But using this, a check will be needed for the hard coded substring "Windows", which is not an elegant solution.
Is there any other way of achieving this functionality?
Thanks!