Core Java

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!

Published on Java Code Geeks with permission by Fahd Shariff, partner at our JCG program. See the original article here: Using Java 12 in Eclipse

Opinions expressed by Java Code Geeks contributors are their own.

Fahd Shariff

Fahd is a software engineer working in the financial services industry. He is passionate about technology and specializes in Java application development in distributed environments.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button