Originally posted by bobby reddy:
...Can the same Java application work on two different OS? ...
Absolutely. This is the idea behind compile once and run anywhere.
The thing is: The different platforms must be running their own (OS-specific) Java Virtual Machine (JVM). This is what allows the
same compiled bytecode to run on different platforms. As pointed out, JVMs can run on Windows, Mac, Linux...