Using latest Eclipse for Java with Java 8 [message #1834921] |
Fri, 20 November 2020 15:54 |
|
I am using Eclipse IDE for Java Developers, Version 2020-06 (4.16.0), and I'm on Java 8.
I always kept Eclipse up to date with the latest version, but last time I updated it I had to rollback because apparently newer Eclipse versions require at least Java 11.
Is that correct ?
If yes, does it mean that now there is no way to keep Eclipse up to date while still using Java 8 ?
|
|
|
|
Re: Using latest Eclipse for Java with Java 8 [message #1834926 is a reply to message #1834922] |
Fri, 20 November 2020 19:39 |
|
Thank you. Now I'm all set, on the latest Eclipse (Eclipse IDE for Java Developers, Version: 2020-09 (4.17.0), Build id: 20200910-1200) and all my Java projects build without errors and run just like before. I'm using Windows 10.
Here is what I did, in case it may be useful to someone.
I took the opportunity to finally switch to OpenJDK, so I installed the latest OpenJDK (15.0.1.9-hostspot) downloaded from https://adoptopenjdk.net/ .
Then I updated Eclipse and I verified that in the preferences under Java / Compiler / JDK Compliance the Compiler compliance level was still set to 1.8, because I want my programs to be able to run on machines that have just Java 8.
Under Java / Installed JREs I added the OpenJDK by pointing to the folder where it got installed ("C:\Program Files\AdoptOpenJDK\") and I set it as default.
All the launch configurations of my Java programs in Eclipse, under JRE tab, were set to Project execution environment 'JavaSE-1.8', so under Java / Installed JREs I associated the execution environment 'JavaSE-1.8' to the OpenJDK JRE as I wanted the OpenJDK JRE to be used to run my programs from inside Eclipse as well. The build showed no errors and when the programs ran I verified they were run by the OpenJDK. Later I will change the setting of the execution environment of my projects to 'JavaSE 14' (there is no 15 yet) and I will point that one to the installed OpenJDK.
After verifying that all was working, I just uninstalled Java 8, so now I only have the OpenJDK installed, and everything kept working as mentioned above.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04005 seconds