How a java software can run on both linux and windows operating system?
Java application.
Because the source is compiled to java byte code (platform independent). GNU/Linux, windows, etc. has their own JVM (Java Virtual Machine) to run the program.
This is a pretty good explanation:
http://en.wikipedia.org/wiki/Java_%28programming_language%29#Java_Platform
http://en.wikipedia.org/wiki/Java_%28programming_language%29#Java_Platform
The whole idea behind JAVA was platform independance. JAVA code is compiled to JAVA byte code. Then it can run on any platform where there is an application that can translate the JAVA byte code to the native platform instructions. This application is called virtual machine. Since JAVA has virtual machines for both windows and linux (and in fact many other platforms) so the same application will run and behave the same on both platforms.
Related topics
