Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Profile photo of Brian Fernandes
Brian Fernandes
Director of Customer Engagement - Loves technology and almost everything related to computing. Wants to help you write better software. Follow at @brianfernandes.


The Java 9 general availability release is just under a month away, but the builds available right now are already feature complete. If you can’t wait to try some Java 9 capabilities, you can start developing with Java 9 in Eclipse, right now!

Installing the Java 9 Support

  1. You need an Oxygen based install of Eclipse – ensure you’re using the R version, and not milestone or integration builds.
  2. Open the Java 9 Support marketplace entry in a browser: https://marketplace.eclipse.org/content/java-9-support-beta-oxygen
  3. Drag and drop the Install button from the webpage into your Eclipse IDE to start the installation. 

    java9blog1

Note: In the unlikely event that the above steps don’t work, you probably do not have the Eclipse Marketplace Client installed – you can then choose Help > Install New Software… and use the following update site in the wizard to install the Java 9 patch: http://download.eclipse.org/eclipse/updates/4.7-P-builds

Using Java 9

It goes without saying, you must have a recent Java 9 JRE or JDK installed, if you don’t, get it here: http://jdk.java.net/9/

The first thing to do is to set up your workspace to use a Java 9 JRE.

java9blog2

Now when you create a project, use the JavaSE-9 execution environment, or select the specific JRE you created in your previous step.

java9blog3

Once your project is created, you have the freedom to do everything from creating and using modules, to exploring the new Collections API, or using one of my favourite features, the new additions to the Process API.

java9blog4

java9blog5

And by the way, if you are wondering why my Eclipse dark theme looks so cool, it’s the Darkest Dark theme.

Note that you don’t need to run Eclipse itself with Java 9 to be able to use Java 9 for development, or even to execute Java 9 applications and JUnit tests. However, if you do want to do this, please read this article. For more examples of Eclipse’s Java 9 support, see this page.

Java 9 Highlights

Module System

A module is a named, self-describing collection of code and data – the JDK itself has been divided into a set of modules. What does this mean? Improved performance by using only the parts of the JDK, or a modularized third party library that you need. Better maintainability of your own complex code; with modules you have better encapsulation, can cleanly expose API, and have explicitly declared dependencies.

Private Interface Methods

An extension of the default methods introduced in Java 8, the private interface methods make it easy to share code within interfaces, while keeping it unexposed.

Factory Methods for Collections

Want to create an immutable collection easily? You no longer need several add statements. Try this: 

Process API Improvements

Sick of using third party libraries, or even executing shell scripts to do something as simple as getting the PID of a process? I know I am – with Java 9, that’s now a thing of the past with the ProcessHandle#pid method. There are several other improvements here that allow better Java <> OS interaction too.

There are several other key features, like HTTP /2 support, Multi-release JARs, a better Stream API, improved Javadoc, and Applets (remember them?) are finally getting deprecated, these are just my highlights. For an exhaustive list, have a look at Oracle’s what’s new document.

Related Posts

Equifax Data Breach Advisory Many of you may have heard of the Equifax data breach, possibly affecting millions of consumers. Information accessed by hackers during the incident included Social Security numbers, personal details, driver’s license numbers, and even credit card numbers.Equifax has confirmed that the breach was made possible by a vulnerability in the Apache Strut...
SDC 2017 SR2 – Software Delivery Evolving Fu... Perhaps you're already a fan of the delicious combo offered by our Secure Delivery Center (SDC) -- you get the right software to your teams and manage a variety of actions (licenses, software updates, rollouts and standardization).  With our new version of SDC, we are bringing even more yummy features to the table!What is included in our 2017 SR2 r...
With Genuitec, updates are free! Did you know that you already have access to the latest Genuitec products, as a licensed user? This includes brand new releases - there's no need to buy a new version when it is released.Perhaps you have gone all the way and purchased MyEclipse, our Java IDE that includes the best tools for dynamic frontend and powerful backend development, and are...
CI 6 — More Magic Coming Your Way! The magic continues -- CI 6 is has just come out, bringing more software updates that offer continuous improvement to our tooling. Even though some breaks in CI 5 affected just a few users, we’re taking this opportunity to add a series of incremental features to make everyone’s experience pleasant. This release brings the betterment of Angular and ...

Posted on Aug 24th 2017