Java is one of the few programming languages whose history crosses several major shifts in computing: consumer electronics, the rise of the Web, enterprise applications, open source, smartphones, and the cloud.
When it reached the public in 1995, its promise was summarized by a famous slogan: “Write Once, Run Anywhere.” Java gave that ambition a practical form through a durable combination of a relatively approachable language, bytecode, the Java Virtual Machine (JVM), automatic memory management, and a shared library.
Yet Java was not designed for the Web. Its story began several years earlier in a project exploring the future of electronic devices.
1991: Project Green
In the early 1990s, Sun Microsystems was best known for Unix workstations and network computing. Some engineers believed the next wave would also involve intelligent consumer devices such as interactive televisions, set-top boxes, and home electronics.
In 1991 Sun launched the Green Project. One of its members was James Gosling, who would play a central role in designing the new language.
The problem was clear: those devices could use very different processors and environments. Maintaining a separate software version for every architecture would be expensive and fragile. Portability therefore became a design requirement from the start.
Oak: Java before Java
Gosling first experimented with C and C++. C++ offered powerful abstractions and precise resource control, but the team wanted an environment that was easier to deploy across heterogeneous hardware.
Gosling created Oak, named after an oak tree visible from his office. The language kept syntax familiar to C and C++ programmers while removing several difficult low-level mechanisms. Memory was reclaimed automatically by a garbage collector, and explicit pointer arithmetic disappeared.
The goal was not merely to run the same software elsewhere. It was also to make complex programs safer and more predictable.
Bytecode and the JVM: moving the portability problem
Java’s defining architectural choice is its execution model. Source code is normally compiled not for one specific processor but into an intermediate format called Java bytecode, which is then executed by a Java Virtual Machine.
If a platform provides a compatible JVM, it can in principle run the same bytecode. Instead of adapting every application to every machine, the JVM is adapted to each platform.
That is the foundation of Write Once, Run Anywhere. Perfect portability still depends on libraries, system integration, and implementations, but this architecture greatly reduces platform-specific work.
From Project Green to the Web
Project Green did not achieve the expected commercial success in interactive television. At the same time, the World Wide Web was taking off. Sun realized that a language built for heterogeneous devices could also be useful on a network connecting very different computers.
Oak had to be renamed for trademark reasons, and Java was chosen. Sun publicly introduced the language in 1995.
Sun also developed HotJava, a browser able to run small Java programs embedded in Web pages: applets. Animations, interfaces, and small games made the Web appear dramatically more dynamic. Netscape quickly added Java support, giving the language enormous visibility.
That showcase would prove temporary.
Java is not JavaScript
The similar names still cause confusion, but Java and JavaScript are different languages.
JavaScript was created in 1995 by Brendan Eich at Netscape as a lightweight browser scripting language. Its development is covered in our article on the history of JavaScript.
Java became especially important for applications, servers, and enterprise systems. JavaScript became the browser’s native programming language before expanding to servers and many other environments.
Java 1.0: a platform, not just a language
In January 1996 Sun released the Java Development Kit 1.0. Java was already more than syntax: the language, compiler, JVM, standard library, development tools, security mechanisms, and dynamic class loading formed a coherent platform.
Developers could rely on common APIs for collections, input/output, networking, graphical interfaces, and concurrency. This shared foundation became as important as the language itself.
Java also adopted many principles of object-oriented programming: classes, objects, encapsulation, inheritance, and polymorphism. Compared with C++, it automated more memory management and avoided several low-level operations, choices that favored long-term maintenance of large applications.
Java 2 and the enterprise era
Java 1.2, released in 1998 under the Java 2 name, organized the platform into several editions: J2SE for general use, J2EE for enterprise applications, and J2ME for constrained devices.
J2EE played a major role. Servlets, JavaServer Pages, Enterprise JavaBeans, database access, messaging, and application servers provided a standardized environment for large distributed systems.
Java became common in banking, insurance, telecommunications, government, and large corporations. Portability, static typing, garbage collection, a mature JVM, and abundant libraries suited organizations that expected software to remain in service for ten or twenty years.
The JVM becomes fast
Early JVMs had a reputation for poor performance. That weakness diminished with Just-In-Time (JIT) compilers, which identify frequently executed code and compile it into optimized native instructions while the program runs.
The JVM can therefore observe actual behavior and optimize paths that are really used. HotSpot, acquired and integrated by Sun, became a central technology of the platform.
Java gradually moved from being dismissed as too slow to powering very large server systems.
Why applets disappeared
While Java prospered on servers, applets declined. They required browser plugins or local Java installations, created security and deployment problems, and could be slow to start.
Meanwhile HTML, CSS, JavaScript, and Web APIs became powerful enough to build rich interfaces without plugins. Browsers eventually abandoned those historical technologies.
The disappearance of applets did not mean the disappearance of Java: the language had already found far more durable uses on servers and in enterprise systems.
Java 5: modernize without breaking
In 2004, Java 5 introduced generics, annotations, enumerations, autoboxing, and enhanced for loops, among other features.
Generics improved type safety in collections. Annotations became essential to frameworks that attach metadata to classes, methods, and fields.
This release illustrates a challenge that would follow Java ever since: evolve enough to remain modern without sacrificing the compatibility that made it valuable.
The ecosystem becomes as important as the language
Much of Java’s history happened outside its syntax. Apache Tomcat, Hibernate, and especially Spring changed server application development. Spring popularized dependency injection, and Spring Boot later simplified standalone applications and Web services.
Build tools such as Maven and Gradle, testing libraries, and IDEs including Eclipse, IntelliJ IDEA, and NetBeans made it practical to work with very large codebases. Industrial-strength tooling became a major part of Java’s longevity.
OpenJDK and a platform beyond one vendor
In 2006 Sun announced the opening of major parts of Java. OpenJDK became the open-source reference implementation of the platform.
When Oracle acquired Sun in 2010, Java entered a new institutional era and debates followed around licensing and governance. OpenJDK, however, became increasingly central.
Oracle, Red Hat, IBM, Amazon, Microsoft, and other organizations now contribute to the ecosystem or distribute their own builds. Java became a shared infrastructure much less dependent on a single commercial distribution.
Android: another life for Java
Early Android SDKs used Java as the main application language. Android did not simply run applications on a standard Java SE JVM: Google built its own stack, first Dalvik and later ART.
That distinction and the use of Java APIs contributed to a long legal dispute between Oracle and Google. Java nevertheless remained the emblematic Android language for years.
Kotlin was later officially supported and preferred for many new projects, but a vast amount of Java code remains in the Android ecosystem.
Java 8: lambdas and streams
In 2014, Java 8 delivered one of the most important modern changes. Lambda expressions made behavior more concise, while the Stream API introduced a declarative model for filtering, transforming, and aggregating data.
Java adopted more ideas from functional programming without abandoning its object-oriented foundations. Java 8 remained a dominant production release for many years.
The JVM becomes multilingual
The JVM is no longer reserved for Java. Scala combines object-oriented and functional programming, Clojure brings a Lisp-inspired approach, Groovy provides a dynamic language, and Kotlin offers modern syntax with strong Java interoperability.
This diversity shows that one of Java’s most durable achievements may be the virtual machine itself. Developers can benefit from the garbage collector, JIT, diagnostics, and JVM ecosystem without writing Java directly.
Modern Java: regular evolution and virtual threads
Beginning in 2017, Java adopted a more regular release cadence. Modern versions have added modules, var, records, text blocks, pattern matching, sealed classes, and virtual threads.
Virtual threads, developed through Project Loom, allow very large numbers of lightweight concurrent tasks while retaining a familiar programming model. They are particularly useful for services that spend much of their time waiting for networks, databases, or other I/O.
This evolution captures modern Java’s strategy: reduce historical friction and adapt the JVM to new workloads while preserving existing applications whenever possible.
Why Java still matters
Java occupies a particular compromise between performance, portability, runtime safety, productivity, and stability at scale. Python emphasizes concision and rapid development; JavaScript historically dominates the browser; C++ provides more direct resource control. Java became deeply embedded in systems that are expected to last.
Its longevity rests on strong compatibility, a mature JVM, sophisticated garbage collectors and JITs, a vast ecosystem, strong diagnostics, and an enormous installed codebase.
Java is still criticized for verbosity, memory use, and startup costs. Records, pattern matching, newer garbage collectors, frameworks such as Quarkus and Micronaut, and technologies such as GraalVM increasingly address those constraints, particularly in cloud and container environments.
Java therefore evolves mainly through continuous adaptation rather than radical reinvention.
From Oak to global infrastructure
Interactive television did not become its breakthrough. Applets disappeared. Sun Microsystems no longer exists as an independent company. Yet Java remains.
Its foundations - portability, a virtual machine, automatic memory management, shared libraries, and compatibility - proved useful far beyond their original context.
Java evolved from a language imagined for electronic devices into a global execution platform, used directly by Java and by a broader family of languages and tools built around the JVM.
Key points
Java began in Sun Microsystems’ Green Project in 1991 under the name Oak. Its bytecode-and-JVM architecture was designed to provide portability across heterogeneous devices.
The Web gave Java its first major showcase through applets, but its durable success came mainly from servers and enterprise systems. Java 2, Java 5, and Java 8 evolved the platform while frameworks and tooling became increasingly important.
The opening of OpenJDK, the diversity of JVM languages, and modern developments such as virtual threads transformed Java into infrastructure that extends well beyond the original language.
Frequently asked questions
Who created Java?
Java was designed at Sun Microsystems in the early 1990s. James Gosling is generally regarded as its principal creator.
What was Java originally called?
The language was first called Oak. It was renamed Java before its public introduction in 1995.
Why is Java portable?
Java code is normally compiled into bytecode, which is executed by a JVM available on different platforms. The same compiled program can therefore run in multiple compatible environments.
Are Java and JavaScript related?
No. Despite their names, Java and JavaScript are separate languages with different histories, designs, and execution models.
Do Java applets still exist?
They have effectively disappeared. Modern browsers removed the plugins required to run them, while Web standards took over their main uses.
What is OpenJDK?
OpenJDK is the open-source project that provides the reference implementation of the Java platform. Multiple companies and communities contribute to it and distribute their own builds.
What is the difference between Java and the JVM?
Java is a programming language. The JVM is a virtual machine that executes bytecode. Other languages such as Kotlin, Scala, and Clojure can also target the JVM.
Why has Java lasted so long?
Its portability, compatibility, mature JVM, enormous ecosystem, and widespread organizational adoption created an unusually durable foundation.