When a small team at Sun Microsystems set out to research the future of digital devices in 1990, they could never have guessed that their work would spawn the most popular programming language for enterprise systems. Twenty years later, and Java remains the workhorse of the enterprise, despite its origin as a language for embedded systems and cross-platform, browser-side applications.

It’s been a long, strange trip for this programming language, but through it all, the one thing Java has managed to do is stay relevant to modern business needs. “One of the most impressive things about Java,” said Geir Magnusson Jr., founder of the Apache Harmony project, “is that 20 years later we’re talking about it because it’s really relevant. I don’t think you can point to anything that’s 20 years old that’s this relevant. There’s no operating system you can say that about. There’s no other language you can say that about.”

(Related: Java’s creator looks back at 20 years)

Mark Reinhold, chief architect for the Java Platform Group at Oracle, said that this longevity is thanks to a ruthless dedication to both evolving and staying the same. “Not only does Java take compatibility very seriously, but Java has been able to evolve to keep up with the times. There aren’t many languages that have gone through the major changes Java has: It added generics in 2005, and lambdas last year, while keeping pretty much all existing code running,” he said.

But it wasn’t always this way. Back in 1990, Bill Joy commissioned Sun developer Patrick Naughton to research the future of development and systems. A few years later, Naughton was joined by Mike Sheridan and James Gosling. The team was renamed “The Green Team” and moved off-site so as not to be bothered by the day-to-day demands of business.

Soon after, the team began working on Star7, a touch-screen PDA designed to help people control their home stereos and entertainment centers. Based in the days when set-top boxes were destined to bring the Internet to our televisions, Star7 never made it to market.

Gosling, while working on Star7, created a programming language known as Oak, named after a large tree outside his office window. This language was built in the image of C++, but with Gosling changing all the bits he felt were too complex or hard to manage. He jokingly called Oak, “C++ ++ –” in reference to his removal and addition of features.

The work continued on Oak and Star7 until it became obvious that Oak was the really interesting bit of the technology. By 1995, Oak had been renamed Java so as to not anger Oak Technologies, a chip maker. With this new name on top, the language was trotted out on stage at the first JavaOne conference, where Marc Andreessen announced that it would be included in the Netscape browser.

This is hailed as the birthday of Java. While it is a somewhat arbitrary date compared to some other milestones in its lifespan, it truly was Java’s coming out party.

While Andreessen was not available for comment on this story, many other folks were. We shall now dive into the history of the language, as told by those who created, used and love it.

The father figure
Gosling joined Sun in 1984. Prior to his time there, he’d written a multi-processor version of Unix, as well as a number of compilers. At Sun, he was pulled into the Green Team somewhere around 1991.

At the time, said Gosling, “One of the things that was really apparent is there were a lot of people outside the computer industry using digital systems inside their jobs. We looked at everything from control systems for elevators, to locomotives, home electronics, to early cell phones. They all had processors in them, but pretty much the whole computer industry was ignoring that, and they were largely ignoring the computer industry.

“We thought this was wrong, and somewhat weird. So we went off and spent some time studying the way that industry works. [We] went on a bunch of road trips to consumer electronics manufactures all over Europe and Asia. We came up with this sort of big feeling there was this collision that was just barely starting to happen.”

That collision is only just now finally happening, with PDAs and phones in everyone’s pockets, and the Internet of Things only just now coming online. Interestingly, Gosling said many of the electronics manufacture and design firms with which the Green Team came in contact were actually reinventing computer networking from the ground up.

That was just silly from the Green Team’s perspective: TCP/IP had long existed, and the state of the art was far from what these devices were using.

But the problem boiled down to one that Gosling summarized best: “One of the issues that came out really strongly, very early on, was that the way we addressed programming itself was causing cost issues with many of the devices. It was causing issues with the business plan for consumer electronics. My part of the project was to go off and think about the programming methodology around this type of highly networked system.”

Funny how a language that was designed for networked “things” grew up to be the language for networked applications. This foundation in the network, however, made Java the perfect language to handle the burgeoning field of distributed Internet applications.

The spawning
Gosling did start from a very real fixed point in the programming universe. “When I started, I was thinking this will just will be C++ with some fixes,” he said. “But then it kind of grew, and the fixes became much more extensive, and so that’s really the only part of the project that survived the Green Project: the programming tool.”

That doesn’t mean the rest of the work on Project Green was useless, however. “The rest of Project Green was really important to provide the motivation for a lot of the issues in Java,” Gosling said. “The really lucky part was this collision between the computer and consumer industries, so a lot of this really showed up [in the real world]. The large-scale networking really has happened. For Sun Microsystems at the time, as a company, networking was the central concept in everything we did.”

All those networked systems have, indeed, come of age, as Java sits atop the world’s largest businesses, and atop the lists of the world’s most popular programming languages, typically closely behind the leader: JavaScript.

John Rymer, senior analyst at Forrester Research, was caught by surprise in the mid-1990s, when he began covering Java from, basically, day one. That surprise came from the quick uptake of the language.

“For me, no matter what you think of a technology or product, when you start to see adoption, you have to take it seriously,” he said. “And, oh boy, did we start to see adoption! People quickly forgot about Smalltalk.”

It’s curious to think that Smalltalk was supposed to be the hot new language for the enterprise at the time. Its everything-is-an-object object-oriented approach to development was appealing to the complex challenges of industry.

But Rymer said Java completely cut off Smalltalk adoption by being a lighter-weight alternative. “Smalltalk people did really interesting things with it. It’s not dead,” he said.

“But it came along with this enormous set of classes which you had to have in your environment, and Java, with its class-loading features, made it much more adaptable. You didn’t have to carry this enormous load of foundation classes. A lot of the environment was built up by dynamically loading the foundation on top of it. [Java] was way more practical.”

Rymer added that it didn’t hurt the language when IBM and Microsoft both jumped in. Microsoft’s interest in Java eventually led to a lawsuit against Sun, which it lost to the tune of US$2 billion.

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.

Jagane Sundar, CTO of WANdisco, was at Yahoo when Hadoop was created. He was responsible for the creation of the Hadoop NameNode, which manages the servers in a Hadoop cluster. The NameNode has to juggle up to hundreds of thousands of server nodes.

“I worked in JavaSoft from 1996 to 1999, and I’ve seen Java come from 1.0.7, to the introduction of the HotJava browser and all that,” said Sundar. “It is an amazing language. It has the ability to improve developer productivity. Hadoop could not have been written in C or C++, because if it had, it would have taken another 10 years to get to where we are now.”

That’s not to say Java is a perfect language, said Sundar. “Garbage collection takes time, and the JVM takes up more memory than one would want, but the reality is these are all outweighed by the benefits, and by how quickly you can bring huge products to production.”

One of the reasons Java has remained relevant is the power of its core features. Despite a wide variety of new APIs, specifications and additions, plain old Java is still quite popular with developers.

“I am more of a simplistic Java type person,” said Sundar. “I would prefer to stay with the core Java features, and not be into the new features. But core Java and its simple features and the original collections class, which Josh Block wrote, is an amazing tool for building systems.”

Java has always played host to innovative technologies, and naturally some have fallen by the wayside. One that Gosling was sorry to see fail was the Java-enabled pen from Livescribe.

“You could write applications for the pen,” he said. “You could write notes, draw a diagram, and you would get a digital capture of the trajectory of the pen. It had a little cameras embedded in it, and it could read the surface you were drawing on. It was a really beautiful device and had a really nice way to write applications and download them to it. I think if they were to resurrect that it could take off now.”

Java of the present
Today, Java is an open-source programming language, supported by open-source programming environments. From NetBeans, to the OpenJDK, to GlassFish, open source is the rule in modern Java.

And while Oracle has certainly provided a road map and stability to Java since it took control of the language when it purchased Sun in 2010, Magnusson still sees some issues in the ecosystem. He created the Apache Harmony project back in 2005 in order to create an open source Java implementation. That work formed the foundation of the Android platform and runtime.

“OpenJDK being a certified implementation is a good thing,” said Magnusson. “The fact that you can find distributions of Linux that now ship with Java right out of the box, this is a good thing. But it’s complicated. The transition of ownership of Java from Sun to Oracle, certainly at that time, changed the dynamic of the ecosystem. That, I think, changed a lot about what was going to be possible in and around open source.”

The OpenJDK, however, is not a place where lawsuits play out, said Georges Saab, vice president of the Java Platform at Oracle. Of the Oracle litigation against Android, he said, “I can’t really comment around anything on the lawsuit, but I would say that OpenJDK is an open community where lots of different vendors and people from different walks of life come together and contribute in the interest in making the code and reference implementation super strong. Everyone has had something good to contribute, and they have a chance to do so. There’s nothing in OpenJDK that’s going out and trying to hurt some other technology.”

Magnusson still sees a reason to work outside of Oracle, however. “One of the nicest benefits of what we were trying to do with open-source Java in Harmony was the ability for Android to take the runtime library we built and use it,” he said. “I think Android has been an amazingly transformative technology that is made possible, in part, by the work we did in Harmony. It’s a bit of a mess, given the legal tangling that erupted form Oracle, but that also points back to that shift in power dynamics.”

Certainly Android is a large part of the future of Java. And beyond Android, the large systems behind the Internet of Things are likely to be Java-based as well. The future is, indeed, bright, with more than a billion new Java users coming onto the platform since Android was introduced.

Gosling is certainly proud of his language, but he said the beauty of Java is not the language itself. He said that the beauty is in the fact that Java “still lets people build cool things. Java is not magical in and of itself. It is a tool for people to build stuff. It’s the hammer and the nail. Some of the things that turn out to be easy to do are things like AI, and other fairly intelligent systems.”