Java Write Once, Run a Few Places

For decades now, the IT industry has been searching for the ultimate portable language. Each new language thrust upon us promised to be the ultimate in portability. FORTRAN was supposed to let a programmer work anywhere…until you had to pull your data from tapes and files. COBOL had similar problems, but really jumped the shark when CICS user interfaces got added to the mix.

BASIC was supposed to be the first language every programmer learned. Some platforms, like OpenVMS gave this language unprecedented power. Then Microsoft got a hold of the language and really ran it into the ground. You can’t even run Visual Basic code across multiple MS operating systems. Nice Job guys.

After learning some hard lessons with Visual BASIC, MS came out with DOT NOT. This was supposed to lock the entire Web into using only MS products since it only worked with MS products. So much for that idea. The release of Windows Vista has proven once and for all that MS has no idea what it is doing and companies are abandoning the MS platform in droves.

Remember how Java was going to be the Utopia of portable languages. People laughed when I told them “just give it time to fail”. They aren’t laughing anymore. Broken Java implementations are strewn across the planet. Only the simplest of applications work when compiled on a 32-bit JVM then run on a 64-bit JVM and vice versa. Now there are enough different flavors of Java out there to bring havoc upon the land. You can’t even use the old “Least Common Denominator” trick when writing code. For those of you who don’t know what the LCD trick is, it means you use the oldest, most widely supported version. Just try running code written for Java 1.0 with a new JVM and see how far you get. So much has been obsoleted that only the simplest of programs will run.

Today I encountered the final nail in the Java coffin.

static final long serialVersionUID = 1;

Yes, the creators of Java finally had to admit it was a write once and run a few places language. Serialized Java objects now need to keep track of their versions because if you load the object into an environment which has a newer version of the object, it pretty much won’t run. Of course, stuffing a static final data value into the object class really broke some tried and true Java tricks. People who once created container classes for things like error objects can no longer do this since each of the contained objects will have one of these definitions and the compiler cannot allow multiples.

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc. A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born. Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy: Infinite Exposure Lesedi - The Greatest Lie Ever Told John Smith - Last Known Survivor of the Microsoft Wars When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.