I want to develop a cross platform application.
Is Java cross platform? I mean, can I develop a Java application in Windows and use it in Mac OS X and Linux?
If yes, how?
I find application written in Java, has two setup file one for Windows and other for Mac. This confuses me.
Any illustration or suggestion will be highly appreciated.
Java is cross platform in the sense that a compiled Java program runs on all platforms for which there exists a JVM. (This holds for all major operating systems, including Windows, Mac OS and Linux.)
Yes, this is possible.
This (and the security aspect) is one of the main advantages of running the programs in a virtual machine.
.javafiles).classfiles).jarfile)The very same
.jarfile can be distributed and executed on Windows systems, Mac systems, etc.This is because some applications rely on platform-specific features. They are then bundled with different platform-specific libraries.
Unless you’re developing an application that itself relies on platform-specific features, (such as for instance low-level system calls), you should be able to do just fine with ordinary Java.
Important comment by @Peter Lawrey: