JavaOne 2015 Keynotes (Part 1)

In celebration of Java’s 20th anniversary this year, the JavaOne 2015 central theme was ’20 years of Java’. Oracle vice president of software development in the Java Platform Group Georges Saab’s keynote focused on the journey of Java, its major milestones, and a deep focus on Java 8 and updates. Oracle Java Platform chief architect Mark Reinhold’s keynote laid out the Java roadmap showcasing Java 9, scheduled for release in 2016 Q3.

Reinhold mentioned that the key to Java’s success is in identifying the pain points; figuring out the missing abstraction and adding that abstraction in such a way as to fit existing solutions.

Reinhold said "The goal is to keep improving developer productivity over time while retaining Java’s key values of readability, simplicity, universality and compatibility."

He reasoned that missing abstractions have led to big innovations in the way of generics in Java 5 and lambdas in Java 8. In 2008, Project Jigsaw introduced modules to address two different pain points: classpath hell and the big monolithic JDK.

Classpath Hell

According to Reinhold, the fundamental problem with classpaths is that they are only about classes. He said "Classpath is a way to look up classes regardless of the component, package or even their intended use."

With classpaths there is no way to ensure that the class you are looking for is even present in the jars; neither do we know if there are any conflicts with respect to the APIs. Also, internal APIs may pose safety issues when developers that don’t know or understand their purpose make changes to them.

According to Reinhold, modules provide a stronger abstraction to jar files and are a program component that is implemented not only in the Java programming language but also in the JVM. As he said "Modules are the key to escaping from classpath hell."

A module can be thought of as a container of packages that also describes how it relates to other modules. A module:

Is a container of packages

Names the modules upon which it depends

Does not interfere with other modules

Exports specific packages for use only by the modules that depend upon it.

In-order to employ modules for Java 9, the module for the desired JAR must be declared in a file called module-info.java. The file name is not a class name; it is a convention just like package-info.java; but it can still be compiled with javac. A modular JAR file contains the module-info.class. This modular JAR can be shipped as a single artifact; for pre-Java 9 releases, the modular JAR will work just like a regular JAR.

Reinhold mentioned that the adoption has been simplified by allowing the end users to modularize existing systems from either the bottom up or top down.

Maintenance and Security - A big monolithic JDK has many connections within the JDK subsystem. Also, it lacks the encapsulation of internal APIs which can lead to security issues.

According to Reinhold "modules provide reliable config with strong encapsulation."

With modularization, one may use just what is needed, with improved security. Hence, in JDK 9, all non-critical internal APIs will be encapsulated. Some critical internal APIs such as sun.misc.Unsafe will still remain accessible. The proposal for encapsulation of (most) internal APIs notes that "Critical internal APIs for which replacements are introduced in JDK 9 will be deprecated in JDK 9 and either encapsulated or removed in JDK 10."

InfoQ Weekly Newsletter

Join a community of over 250 K senior developers by signing up for our newsletter. If you are based in the EEA, please contact us so we can provide you with the protections afforded to you under EEA protection laws.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

By subscribing to this email, we may send you content based on your previous topic interests. See our privacy notice for details.

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.