Eclipse IDE, Oxygen Edition; and Java 9
Update: Note that as of October 11/2017, Java 9 is 100% supported “out of the box” by Eclipse IDE, Oxygen Edition; Java 9 can be used to run your Eclipse IDE, Oxygen Edition, and can be used to build Java 9 applications without additional configuration. Download or update today.
I’ll admit that I dropped the ball for a while, but I’m back to testing the Eclipse IDE with Java 9. Java 9 includes some pretty major changes, especially in the way that it restricts access to internal code, and so there’s a real risk that Java-based applications are going to break. Just confirming that the Eclipse IDE runs on Java 9 is a critical task (even before we talk about leveraging actual Java 9 features).
Today, I downloaded the Java 9 Early Access Build 158 (March 1/2017) and reconfigured my working installation of the Eclipse IDE for RCP and RAP Developers, Oxygen Edition (M5) to use it. I’ve added a few extra features to my installation, including the PHP Development Tools, Data Tools SQL Designer, Mylyn WikiText, TM Terminal, and a handy regular expression helper/tester that I found in the Eclipse Marketplace.
Configuration is relatively straight forward. The nice thing about the early access builds is that you can just decompress them into a directory on your system without installing them (which will have a impact on your system’s configuration). The downside is that you have to configure your Eclipse IDE to find it. Actually, this isn’t really much of a downside in my opinion: I like to have some degree of control over what Java runtime I’m using to run the Eclipse IDE rather than just grabbing the system default.
I decompressed the Java build and updated my
eclipse.ini file to point point to it:
... -vm /home/apps/jigsaw-jdk-9-ea+158_linux-x64_bin/jdk-9/bin/ -vmargs --add-modules=ALL-SYSTEM ...
Note that you need to add the
--add-modules option to tell Java 9 to load some modules that it wouldn’t normally load by default. I’m hopeful that we’ll have an update to the launcher to automatically add this option in the M6 builds (see Bug 493761); with this launching the Eclipse IDE will just work if you happen to have a Java 9 JVM installed as your system default.
As a sanity check, I opened the About Eclipse dialog and reviewed the Configuration in the Installation Details to confirm that I’m actually running on Java 9. The next step is to actually start writing some code that leverages Java 9 features; for that I’ll need to install the Java 9 Support for Oxygen from the Eclipse Marketplace.
I’m looking forward to learning a lot more about Java 9 at Devoxx US, including these sessions:
- 55 New Features In JDK 9 with Simon Ritter
- A Post-Apocalyptic sun.misc.Unsafe World with Christoph Engelbert
- Anticipating Java 9 – Functionality and Tooling with Trisha Gee
- JDK 9 Language, Tooling, and Library Features with Joe Darcy
- JShell: An Interactive Shell for the Java Platform with Robert Field
- Preparing for JDK 9 – AKA The Sharp Edges of JDK 9 with Aurelio Garcia-Ribeyro
See you at Devoxx!
Update (2017/09/25): I’ve made a small change to the eclipse.ini configuration to match what needs to be done for the release version of Java 9, and have updated the title and reference to the Eclipse Marketplace record.