Here is how we can force eclipse to run with a different Java version:
Install latest JVM from here: https://www.oracle.com/java/technologies/downloads/#jdk18-windows. then, edit the eclipse.ini file and add the following before -vmargs
-vm
C:\Program Files\Java\jdk-18.0.1.1\bin