Once again, however, the early thoughts from the market on Java were not entirely correct. While the birthday of Java is focused on Netscape’s adoption of the language, client-side Java is a rarity these days, as are browser-based applets.
“I think it found its best use case,” said Rymer of Java. “That was not in the client. It was not in the browser. You had people doing Swing applications, which are desktop applications. It just wasn’t very good at that. You had JavaFX more recently. People went in different directions. Java, it turned out, was a really good language for doing server-side. With JSPs, you could create Web applications without having to run Java on the client.”
Indeed, Java’s first attempts at desktop applications were rife with half-steps and mulligans. Gosling himself even told SD Times that if he could change anything about his initial version of Java, he would have skipped AWT and gone right to Swing.
Internet of Things
That’s a moot point, however, as Gosling’s initial designs are, frankly, just now becoming as relevant as they were originally intended to be. Java was designed for networked “things,” and now, the Internet of Things has arrived.
“If you look at a lot of the back-end systems people use in Internet of Things [applications], pretty much everything that scales is a Java application, or one of the JVM-based languages,” said Gosling. “One of the things that’s sort of weird about Java is that it’s a two-level language. There’s the JVM and Java on top of it. People have built literally hundreds of languages based on the JVM.”
And that’s another thing he was originally designing for: “That one, oddly enough, was in my mind because when I designed the virtual machine, I wanted it to be reasonably flexible because there’s a lot of motivations behind doing that. That gave it the flexibility for other languages on top. The trap people fall into is if you try to do one of these virtual machine designs and say ‘It must be possible to write any programming language on top of that design.’ That’s where you end up failing, and you end up recommitting the major mistakes of computer architecture.”
Languages built on top of the JVM, such as Scala, Clojure and Groovy, have opened the doors to allow at least half of the Java platform do amazing tricks, like functional programming, stateless applications, and dynamic compilation. The platform has evolved to further embrace these aspects over the years, through the addition of InvokeDynamic to OpenJDK 6, and Sun’s embrace of JRuby.
Java’s roots in embedded devices with constrained hardware specifications helped it become a powerful tool for the server, and its heritage in this world is now coming back. The Internet of Things was tailor-made for Java, said Oracle’s Reinhold. “I think one of the reasons Java is attractive in Internet of Things is because it is, in a sense, returning to its roots. Part of Java’s strength rests in the constraints it was originally developed under. They had to keep it small and comprehensible. I sometimes wonder if Java had originally been developed for enterprise-class applications, it might have been bigger and not as successful,” he said.
Built with Java
Early devices, like Java Cards and iButtons, pale in comparison to the massive enterprise applications of today. And when it comes to big projects, Apache Hadoop has come to dominate the Big Data landscape. And it is implemented in Java.