David Flanagan kicks off a new column about the open source development of Java by looking at the OpenJDK and JDK7 projects and the language changes and APIs that might go into Java 7.
Kicking off a new column about the development of Java 7, David Flanagan takes a look at the OpenJDK and JDK7 projects and their processes, language changes that have been mentioned as possible candidates for Java 7, and major new APIs that are tracking for inclusion in the new version.
Editor's Note: With this installment, we kick off a new column,
"The Open Road ," by Java in a Nutshell author David Flanagan.
Our mission for this column is to provide visibility into the
open source development of the next version of Java, which is happening
here on java.net. In this article, David looks at the state of the
OpenJDK and JDK 7 projects, proposed language changes that may appear
in Java 7, and prominent APIs that are being developed for possible
inclusion in Java 7. Each future installment will provide an update on what's currently happening in the latest builds from the project,
along with a deep dive into a new feature or API that's tracking for
inclusion in Java 7 (David discusses some of these in this first
installment). We hope you'll enjoy this early exposure to the next
version of Java, and that you'll be encouraged to download, build,
and/or run the various Java 7-related projects hosted on java.net.
This is the first in a series of articles about Java 7 and the
OpenJDK project here at java.net. This introductory article is a
broad and link-heavy overview of Java 7 and the open projects developing code for Java 7. As those projects release code that
we can try out, future articles will dive into that code!
The JDK 7 Project
The JDK7 project on
java.net is the first place to look for Java 7 updates. This
project releases binary snapshots of Java 7 every two weeks. If you want to try out a new feature of Java 7, downloading a binary is the easiest way to get yourself up
and running. (Note that the JDK7 project is not the same thing as
the OpenJDK; more on that below.)
Each new binary snapshot includes a list of bugs fixed and
features added. It is still early in the Java 7 development cycle,
and so far, the change lists for these early builds have been
pretty dull. They have included updates to Javadoc comments, fixes
for obscure regressions, and incomprehensible tweaks to the hotspot VM,
but very little in the way of new APIs to try out.
As I write this, the current snapshot is "build 16." The most
notable changes in
b16 , in my opinion, are additions to the
java.util.Currency class. That class now has a static
getAvailableCurrencies() method, and instances have
methods to complement
getCurrencyCode(). You can read about these new
methods in the
Javadoc . A new version of the API docs is generated for each
snapshot release. You can always find the current version at
The JDK7 project also releases source code snapshots , under
the Java Research License (or JRL ). The JRL is intended for use
by universities and researchers and is not a true open source
license. If you're interested in these sources, you'll probably
want to read the build
instructions . This source is also available (read-only)
through Subversion , but you'll need to have the jdk.researcher
role added to your java.net ID.
Incidentally, the ongoing development of updates for Java 6 is
handled with equal transparency at jdk6.dev.java.net . Java
6u2 has recently been released, so watch this space for development
of update 3.
The OpenJDK Project
The OpenJDK project is a
completely different entity from the JDK7 project . Given that they both release source-code snapshots of Java 7, however, it can be hard to tell them apart. Here, in a nutshell, are the differences between the two projects:
- The JDK7 project is Sun's open (as in transparent) Java
development process, controlled by Sun, with most development done
by Sun's internal engineering team.
- The OpenJDK project is the Java community's open (as in free
software) source development project to create a completely
free/open source implementation of the JDK. The OpenJDK is
controlled by a governance board . Sun's
engineers participate in the OpenJDK project, but contributions
from outside developers are actively solicited.
If you're an open source advocate or activist, you may be
interested in all the gory OpenJDK licensing and governance details
open source Java FAQ and the OpenJDK legal page .
Sun has already released all of their own Java code under the
GPLv2 license. There remain, however, a few pieces of the JDK that
Sun licensed from other commercial vendors. Thus, the primary
initial purpose of the OpenJDK project is to develop open source
alternatives to that encumbered code, so that a completely
open source version of Java can be released. This is a great place
to get involved if you like low-level coding: there are projects
set up to work on an audio engine, a framebuffer toolkit, a font
scaler, and a graphics rasterizer.
OpenJDK is an umbrella for many subgroups and the subprojects
they run. The current list of groups and projects is in a column
running down the left-hand side of the OpenJDK home page . As you can tell
from the preliminary list of projects above, the 2D Graphics group is
currently the most active one.
We can expect more OpenJDK projects as development of Java 7
gains momentum. Currently, the only Java 7 project is the Modules project,
which aims to create open source implementations of JSR 277 and JSR 294 .
OpenJDK source code is available as source code snapshots
that follow the same build numbering scheme and release schedule as
the JDK7 project. You can also browse or
download the source with Subversion. In addition to downloading
sources, you'll also have to download a complete (but
non-functional) binary snapshot (linked from the same page as the
sources), from which encumbered code can be copied in binary form.
Before you start downloading, bear in mind that official instructions
for building the OpenJDK have not yet been published. (If you are a
NetBeans user, however, you may be able to use your IDE to
build the OpenJDK .)
Java 7 Release Schedule
Open sourcing Java and creating the OpenJDK infrastructure has
apparently taken quite a bit of work for Sun, and this brings us to
the bad news. Sun typically aims to release new versions of Java at
18-month intervals. Java 6 was released in fall 2006. The original
Java 7 schedule, therefore, called for a release in spring 2008.
Given that the current builds available from the JDK7 project have integrated no
major new features, we obviously aren't even close to a beta
Coward , who will be the spec lead for the Java 7 JSR, now says
that they're aiming for a release in January 2009, about 16
months from now.
Java 7 Features
Back in the fall of 2006 there was a lot of talk about what
features might be included in Java 7. Coward listed some
possibilities in September, and
detailed some of them (PDF) in November 2006.
With these semi-official feature lists as a starting point, Alex
Miller has been tracking
development and discussion of possible Java 7 features at his
Pure Danger Tech blog. Alex's Java 7 site is probably the best and most
current Java 7 resource out there.
The truth is, however, that we really don't know what will be in
Java 7. The speculation from last fall is still just speculation,
and given the amount of schedule slippage since that time, there
are likely to be changes, possibly significant changes, to Danny's
original lists. What we're waiting for is his submission of
the Java 7 platform JSR. When published, this JSR should reveal the
features that Sun is targeting for Java 7. He says that we
should expect a JSR to be released "over the next couple of
months." He admits, however, that he's been saying that for some
Language Changes for Java 7?
2006 post suggested that Sun would propose "a small set" of
changes to the Java language. Candidates then under consideration
- Language-level XML support
- Block constructs
- Strings in switch statements
- Language support for
- Java property support
- Lightweight method references
- Extensions to the annotation mechanisms
The possibility of languages changes aroused a lot of interest.
floated and discussed at length, with the discussions culminating
in a face-to-face meeting of the principals at JavaOne '07. Adding
support for property access without getter and setter methods was
also much debated. Recently, however, discussion of new language
features has quieted down. Faced with the reality of the schedule
slippage, Neal Gafter
javac maintainer, and one of the primary advocates
for Java closures) predicts that Java 7 will either be delayed
until late 2009 or that language changes will be deferred until
As a further reality check on adding features to a mature
language, read Alex
Buckley's blog . Alex is the new maintainer for the Java
Language Specification, and as such, he will be intimately involved
with any language changes. Although he hasn't written much,
everything Alex has posted on his blog is interesting.
Projects of Interest
Until we see a formal Java 7 JSR, and until we start seeing more
significant code being checked into the JDK7 and OpenJDK projects,
we'll have to content ourselves with projects that are being
developed independently. The following projects have code available
to download and try out now:
application framework (JSR 296 ) and the Beans Binding (JSR 295 ) projects aim to simplify Swing development.
The Measures and
Units project (JSR 275 ) is developing a library for working with quantities and the units with which they
are measured. This library uses Java generics to allow static type
checking of unit compatibility. This JSR has just completed its
early draft review, and a new implementation, incorporating changes
based on that review, should be released soon. While this JSR did
not appear on last fall's list of candidates for inclusion in Java
7, the spec lead hopes this small library makes it into core
The Date/Time API
(JSR 310 ) aims to
comprehensively solve the date and time representation problems
that have plagued the Java platform. Work on this JSR is very
transparent (there is a wiki and an open mailing list) and discussion
and development are active and ongoing. Preliminary (but unstable)
code is available to try out. The developers hope to have their
work included in Java 7.
Doug Lea is working
on a Java 7
update to the JSR 166
utilities. His fork/join package is a concurrency framework for
cleanly dividing tasks up for efficient concurrent execution on the
multicore CPUs of the future. An implementation
is available as is an academic paper (PDF) about the framework.
As mentioned earlier in the article, the OpenJDK Modules project is
an implementation of JSR 277 and JSR 294 , both of which
are expected to be part of Java 7. A partial implementation is
available at the main OpenJDK download page. At this point, it is a source-only release and you must build
the JDK from scratch to try it out. I'll write about this project
when there is a binary snapshot to try.
I hope to cover some or all of these projects in future
installments of this column. Your suggestions for projects to cover
are welcome in the comments below.
width="1" height="1" border="0" alt=" " />