I am writing a bash script that should execute some Java application that needs a specific classpath.
Further, this script should be executable on both, Ubuntu & Windows (Cygwin).
The problem: The seperator on Windows is ";" and the seperator on Ubuntu is ":". This results in java -cp A.jar;B.jar Main on Windows (also when using cygwin, because it's using Windows' java) and java -cp A.jar:B.jar Main on Ubuntu.
The question: How to detect in the bash script which underlying operating system is running / which java classpath seperator to use?