I am seeking to run a common Java program in both Windows and Linux.
The program needs to do some things differently on each platform.
So how can / should my Java program detect it is running under Linux vs. Windows?
apache commons lang has a class SystemUtils.java you can use :
SystemUtils.IS_OS_LINUX
SystemUtils.IS_OS_WINDOWS