Java: Platform or Language?

WRITTEN BY Dave Nicolette


Java has earned a place of honor in the history of computing. From humble beginnings in the mid-1990s, it has become one of the most widely-used technologies in the world.

Java is a platform: A collection of technologies that enables development of various applications targeted to various execution environments. The basis of the Java platform is the Java Virtual Machine (JVM) specification.

Java is a language: A defined set of keywords, syntax, and semantics that can be compiled into an executable form. The executable form, bytecodes, is interpreted by a JVM.

Many organizations depend on Java quite heavily for mission-critical systems, including servers, third party products, and home-grown applications. More than 10 million developers specialize in Java. Java runs at every level in most corporate IT environments from the front end to the back end.

Which side of Java ought to be of greater interest in corporate IT operations: The platform or the source language? Is it the platform or the language that enables technical capability and business flexibility?

The Argument for Java as a Language

Most of the arguments among technical people focus on aspects of the Java source language. It lacks this or that feature that’s supported in My Favorite Language. It’s verbose. It’s heavyweight. Oh, mercy, the type declarations on both sides of the equals sign. And all those semicolons!

The majority of IT managers also seem to think of Java mainly as a source language. When they insist, “We’re a Java shop! Everything must be in Java!” they could be understood to mean, “Everything must run on a JVM!” That would be sensible. But it’s not what they mean.

The Argument for Java as a Platform

If we remember Java is a platform, and not merely a source language, then most or all of those arguments vanish in a puff of logic. Need dynamic typing? Use Groovy. Need functional programming? Use Scala. Need a Lisp/Scheme-like thing? Use Clojure. Need Ruby? Use JRuby. Need Python? Use Jython. Need a less cluttered and more intuitive form of Java source for general programming? Use Kotlin. Need access to the tens of thousands of useful Java APIs that are available? You have it. Need interoperability with existing Java applications? You have that, too.

I think the latter view of Java is more useful in a corporate IT environment.

“People get hung up on Java source. It’s the Java platform that offers the real power.”

Write your programs in whatever source language is appropriate for the problem at hand. That approach tends to make the source easier to read and maintain over the lifetime of the application, even if different components of the same application are coded in different source languages.

This is nothing new. The concept of a platform vs. a source language is core to the Microsoft .NET world (no pun intended). The Common Language Runtime (CLR) specification details how compilers can convert source code in any language into a Portable Executable (PE) file that can run on any implementation of the CLR. Quite a few languages are supported.

The idea is even older than that. The Language Environment feature of IBM zOS enables programs to be written in any source language, and execute in a consistent and interoperable way at runtime. All the programs have access to the same libraries. They have full legacy compatibility back to the beginning of time. Back in the dim dark past we used to write different parts of solutions in different languages, depending on the characteristics of each part. It was normal.

You can use the Java platform in the same way. Match your source language to the nature of the problem you’re solving. Compile to a common runtime specification. You’re set. You don’t have to re-write or re-platform any pre-existing code. You can move ahead with newer technologies without sacrificing any backward compatibility.

My Opinion

The platform is what makes Java compelling even after all these years. The source language as such is far less interesting.

leave a comment

Leave a comment

Your email address will not be published. Required fields are marked *