Java (a brief historical introduction)

java dev.to

Java was born in the early 1990s, inside the offices of Sun Microsystems, mainly through the work of James Gosling and his team. The original idea was part of the Green Project, which aimed to create software for a new generation of electronic devices. The language was originally called Oak. The story goes that the name had to be changed because there was already a brand using it. Some versions of the story also say that Java was inspired by a coffee shop, or simply by the coffee the developers were drinking. ☕

From the very beginning, one of Java's main ideas was to be cross-platform, summarized by the famous phrase “Write Once, Run Anywhere”. At the time, making software run on different operating systems was not nearly as simple as it is today. The big idea was to introduce a layer between the application and the operating system: the JVM (Java Virtual Machine). This way, Java code doesn't need to be compiled directly for Windows, Linux, or another specific platform.

This is where the famous bytecode comes in. When we write a Java program, the compiler transforms the .java source code into bytecode, usually stored in .class files. This bytecode isn't exactly native processor code. It is executed by the JVM, which understands the specific platform where it is running. Over the years, the JVM became extremely sophisticated, using techniques such as JIT (Just-In-Time) compilation to turn parts of the bytecode into native code during execution.

Java is now more than 30 years old. And it's interesting to see how much the language has changed during that time. Generics, annotations, lambdas, Streams, modules, records, pattern matching, sealed classes and, more recently, virtual threads, are just a few examples of how the platform has evolved. Someone who learned Java 15 or 20 years ago would probably find a very different language when looking at modern Java.

That's why some of the old stereotypes about Java don't make as much sense anymore. “Java is slow”, “Java is extremely verbose”, “Java requires too much code”... Some of these criticisms were certainly valid at different points in time. 😅 But comparing modern Java with Java 5 or Java 6 isn't exactly fair. The language has become much more expressive and has eliminated a lot of boilerplate over the years, while still keeping static typing as one of its fundamental characteristics.

And there is something interesting: despite all this evolution, many companies still run Java 8. Java 8 was released in 2014 and is still present in a huge number of enterprise systems. Since then, we have had important LTS (Long-Term Support versions) releases such as Java 11, Java 17, Java 21 and Java 25. This longevity also shows one of the major strengths of the Java ecosystem: compatibility. The strong focus on backward compatibility allows systems to keep evolving without having to be rewritten from scratch with every new version.

At the end of the day, learning a little about Java's history helps us understand how we got here. The JVM, bytecode, portability and the focus on compatibility didn't happen by accident. They are all part of a history that spans more than three decades. Java has changed a lot, but it still carries some of the fundamental ideas that helped it come this far. And understanding where we came from helps us understand the Java we use today.

Source: dev.to

arrow_back Back to Tutorials