Saturday, June 01, 2019

Using Java 12 in Eclipse

1. Install JDK 12

Link: https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html

2. Install Eclipse 4.11

Link: https://download.eclipse.org/eclipse/downloads/drops4/R-4.11-201903070500

3. Install Eclipse Java 12 Support

Start Eclipse and go to Help > Install New Software. Add Update Site: https://download.eclipse.org/eclipse/updates/4.11-P-builds. Install Eclipse Java 12 support for 2019-03 development stream from the list of available software

4. Add Java 12 JRE to Eclipse

Go to Window > Preferences, navigate to Java > Installed JREs and add the Java 12 JRE (that you installed in Step 1). Tick the box to make it the default JRE

5. Upgrade Compiler Compliance Level

In your preferences, go to Java > Compiler and select "12" as the "Compiler compliance level". In addition, tick "Enable preview features".

That's it! Now you can try out Switch Expressions!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.