Download a PDF of this article
Is Java SE open source software? The short answer: Yes.
Oracle has always been committed to open source with Java. But it took a few years to fulfill that commitment, due to Java’s earliest history.
Because Java took a circuitous journey in the early stages to reach its open source destination, developers and other users have been understandably confused by whether Java is open source.
However, Java’s open source status can be summarized this way: Java started on its open source journey in 2006 but finally completed it with a full reference implementation in 2011 when Java SE 7 from Oracle launched.
The open source development of Java is led by Oracle within the OpenJDK community. The specification processes are managed by the Java Community Process (JCP).
You can also get commercial Java licenses, enterprise features, and support from many places—including Oracle, of course. Oracle’s commercial Java offering is Oracle Java SE Subscription. The core runtime and libraries of the Oracle JDK use the same code as OpenJDK, with a few trivial differences (such as packaging and look and feel). Oracle’s commercial license also includes professional support—somebody to call, 24x7, if you have a problem—as well as commercial software tools for managing and monitoring Java in the enterprise.
The open source process makes Java better, says Georges Saab, Oracle’s vice president of development for the Java platform. It’s better for developers, users, and businesses—including Oracle. It helps make development more transparent and drives innovation, stability, and a predictable release cadence.
For a programming language to become popular and remain popular, openness is important, says Saab. “Java being open source is one of the reasons for its enduring popularity. People in the ecosystem appreciate the transparency that goes into the development process. It’s something that makes both developers and enterprises comfortable using the technology, knowing they can get this kind of insight into direction.”
In general, open source development gets new features into the release cycle earlier than new features appear in proprietary software. With proprietary software, development is done in secret, and users get to see new features only when the software hits beta, late in the development process—often too late to incorporate feedback into the final version. Open source development permits faster increments of change and earlier and more-substantial feedback.
In addition to the other benefits, the open source community helps drive Java development in niche directions, making the language richer and more useful, says Eric Sedlar, vice president and technical director of Oracle Labs. For example, the open source community led the development of running multiple languages on the JVM, and the community developed support for running languages together in combination.
“We would not have gotten as complete or reliable designs if we did not interact with the open source community,” Sedlar says.
All of those benefits don’t come from nowhere. They require a thriving and active global open source community, which Oracle stewards.
The JCP sets the direction for evolving Java specifications. Founded in 1998, the JCP has more than 1,000 members; more than 200 of those members are corporations, more than 100 are Java user groups (JUGs), and the rest are individuals. The 18-member Executive Committee has approved 393 Java Specification Requests (JSRs) to date.
In addition to the JCP, more than 350 Java user groups bring together more than a half-million members worldwide.
Discussions about the development of Java and associated projects happen in the open, on dozens of OpenJDK mailing lists.
Some 345 individuals have been designated as Java Champions by Oracle. They are skilled Java technologists and community leaders who spread information about Java and help Java developers excel. (Several Java Champions write regularly for Java Magazine.)
Oracle has a deep commitment to open source and a large and vibrant Java community. To understand how the Java community evolved to where it is today, you need to go back in time.
The year is 1995. Microsoft launches Windows 95 with a huge marketing campaign and people lining up at midnight to buy it. Amazon launches its web store. Larry Page and Sergey Brin launch a search engine called BackRub—they’d later launch Google. The top-grossing movie is Dumb and Dumber while other hit movies of the year include The Net, starring Sandra Bullock; the cybercrime caper Sneakers, with Robert Redford; and Pixar’s first feature film, Toy Story.
Also in 1995, Sun Microsystems debuted Java to the world as proprietary, closed-source software.
To provide some context, in the 1990s the tech industry wasn’t as accepting of open source as it is today, says Donald Smith, senior director of product management for Oracle’s Java platform group. Indeed, the phrase “open source” wasn’t even coined until 1998—three years after Java launched. Until then, advocates talked about free software.
By the late 1990s and early 2000s, a group of companies, including Sun, realized sharing Java code would be helpful. No individual vendor could fulfill Java’s “write once, run anywhere” mission. “No one vendor can write all of the everywheres, right?” Smith says.
Sun, IBM, Hewlett-Packard, Fujitsu, Oracle, and Apple all worked on optimizing Java to run on different platforms. The companies shared source code. But it wasn’t open source. The code was closely held and tightly restricted.
That wasn’t good enough to satisfy everyone, which is why Sun delivered OpenJDK 6, the first open source version of Java, in 2007. OpenJDK 6 was incomplete, but it allowed Sun to begin finding efficient ways of collaborating with other interested parties in an open source process and to begin building the Java open source community.
The release of Java 6 as open source left a lot of work to do. “There was a lot missing,” Smith says. Some of the intellectual property in Java was commercially licensed and required finding suitable open source alternatives or developing alternatives where none existed.
“The other challenge was there was some code that was downright ugly and required substantial review for stability, performance, and security reasons, which required a lot of time and effort,” Smith says.
Oracle acquired Sun in 2010. “Immediately after the acquisition, Oracle said in no uncertain terms, ‘We believe strongly in OpenJDK, and it is our intent to reinvest in Java at OpenJDK to continue to fill in the gaps,’” Smith says.
And indeed, soon afterward, Oracle released Java 7, the first reference implementation for Java based fully on the OpenJDK build. Previously, the reference implementation for Java was the closed Sun JDK build. Java 7 was the first version of OpenJDK complete enough to be used to build a full Java runtime. Previously, OpenJDK was not enough; to build a complete Java runtime, you had to source components from multiple places.
However, even after Java 7, Oracle did not provide its own OpenJDK builds, other than the reference implementation. Oracle provided only the closed-source Oracle JDK, although it had free licensing even for production use.
The differences in code between Oracle JDK and OpenJDK were in little things such as font libraries and XML parsing, with the gap closing with every major release that followed Java 7. For small applications, the difference was “infinitesimally small,” says Smith.
For an application at scale, the Oracle JDK was far more suitable. And Oracle JDK was far more pervasively used, which meant it got more bug reports and was more likely to get fixes first. This was particularly the case with OpenJDK 6; those fixes could take time to flow into the open source code, because its code base remained substantially different from Oracle JDK 6.
Another open source breakthrough for Java was in 2017, when Oracle announced plans to ship its own OpenJDK implementation. That was the same year that Oracle transitioned to a six-month release cadence for new versions of Java. “Because we had essentially closed the gap between the Oracle JDK and OpenJDK libraries and runtimes, we could just as easily provide our own OpenJDK builds at the same time as our Oracle JDK builds,” Smith says.
Along with Oracle introducing its own OpenJDK implementation, Oracle stopped offering free licenses for its closed version of Java, the Oracle JDK. Instead, Oracle encouraged free users to use Oracle’s own open source releases of OpenJDK.
The new deal was better for users, because OpenJDK is free and open source, whereas the previous license for the Oracle JDK, the “Binary Code License,” was restricted to being free only on “General Purpose Computers,” that is, desktops and servers, but not on other computing devices such as phones, sensors, industrial control systems, storage management systems, and so on.
However, the plan was widely misunderstood. “The headline was ‘Oracle now charging for Java,’ when the headline should have been, ‘Oracle now makes open source Java binaries, beyond the reference implementation,’” Smith says.
Because some confusion lingered, in September 2021 Oracle made the closed source Oracle JDK free again, for production use or for commercial use, though you can’t redistribute it for a fee.
“If you just want a free Java runtime and don’t care if it’s open source, use the Oracle JDK,” Smith says. “You can’t embed it in something and redistribute it for a fee, but subject to the license conditions, you can use it to run your bank for free. Or you can use Oracle OpenJDK and do the same thing and have access to all the source code.”
In more than a decade of Java stewardship, Oracle has been fully committed to open source, taking Java from powerful but closed software to an open source language suitable for running the world’s most important applications. It’s been a winding road to fulfill the commitment, but it’s a journey that will deliver results for generations to come.