Eclipse Oxygen.1a is out — with support for Java 9 and JUnit 5
© Shutterstock / Velikanov
Oxygen.1a update release is now available for download. The most noteworthy things available in the Oxygen.1a are definitely the Java 9 and JUnit 5 support. If you want to know more about the IDE improvements, you’re in luck: Holger Voormann has created a video to help you navigate easily through all the changes.
Oxygen.1a (now available for download) is here and it comes bearing gifts — namely support for Java 9 and JUnit 5.
If you are using an Eclipse workspace where you were running your JUnit 5 tests via
@RunWith(JUnitPlatform.class) in Eclipse without JUnit 5 support, JUnit 4 will be the test runner in their launch configurations.
Before you execute these tests in Eclipse with JUnit 5 support, you should either change their test runner to JUnit 5 or delete them so that new launch configurations are created with JUnit 5 test runner while running the tests:
For more details, check out the update instructions.
Eclipse support for Java™ 9
Mike Milinkovich, the Executive Director of the Eclipse Foundation, told us three months ago that “the JDT team has worked hard on building great Java 9 support for Eclipse Oxygen” and revealed that this is his favorite highlight in Eclipse Oxygen.
Read the entire interview here.
Now that Java™ 9 is here, JDT fully supports it:
- The Eclipse compiler for Java (ECJ) implements all the new Java 9 language enhancements
- Updated significant features to support Java Modules, such as compiler, search and many editor features.
Keep in mind that you don’t have to run Eclipse with Java Runtime 9 to get the Java 9 support. However, a Java runtime 9 is required to be on a project’s build path to compile a modular project against the system modules.
Let’s see what this all means:
- When a Java Runtime 9 is added to a project’s build path, the system modules are listed under the System library in the package explorer:
- An existing non-modular Java project can be quickly converted to a module by creating a module-info.java for that project. This feature can be availed once the project has been moved to compliance 9:
- With Java 9 support, a library or a container can now be added to the module path as opposed to the classpath:
- Once a module has been added to a project’s module path, its encapsulation properties can further be modified by clicking on the Is Modular option and editing the Module properties. The following example shows how module
module.onecan can be made to export its packages in the context of the current Java project:
- Java search now includes a new search scope – Module:
See also the News for Eclipse Oxygen.
Eclipse Oxygen includes a number of improvements for functionality and performance. If you want to revisit some of the impressive new upgrades for the general IDE, Java, and Git, check out this article.