Java - Configure Eclipse to use a certain version of Java

by
Jeremy Canfield |
Updated: March 23 2022
| Java articles
Eclipce can be run with different flavors and difference versions of Java, such as Sun Java, Oracle Java, or OpenJDK, just to name a few. If you want Eclipse to use a particular version of Java, add the following lines at the very beginning of your eclipse.ini file.
-vm
C:\path\to\your\javaw.exe
For example:
-vm
C:\Program Files\Java\jdk1.8.0_131\bin\javaw.exe
Then, launch Eclipse, and select Help > About Eclipse > Installation Details > Configuration tab, and ensure that the path to your javaw.exe file is displayed. In this example, Eclipse is running on version 8 of Java, update 201.
Did you find this article helpful?
If so, consider buying me a coffee over at