Java WORA – How JVM and Java’s WORA Differ from Other High-Level Languages

cross platformjavajvmpython

In the Java world, we often talk about the JVM, and when Java was new it had the supposedly killer feature of "Write Once, Run Anywhere."

From the way people talk and write, this seems different from the way that Python, for example, works. Yet I've not been aware of any way that Python code that I've written would work differently on another machine. (Though I haven't written that much Python.)

So what am I missing? How is the JVM different from a Python interpreter? Is there a way that Python lacks Java's platform independence? Or is this just a cultural difference?

Best Answer

Java does a very good job on isolating you from the underlying OS and gives you the same exact tools on most platforms it works on to talk to things in the underlying OS.

Python on the other hand does not do as good of a job in isolating you from the underlying OS, It does not have a standard way of handling between process communications (look at the differences in the sys module and os module between a windows and *nix implementation of Python for example.)

I have written code in python that would only work on a *NIX box or Windows box using just Python available API calls, where in Java it would be very difficult to write code that was just Java API that would not work the same on both a Windows box or *NIX box