To use Eclipse (4.7 Oxygen, 28 June 2017) you will need to have Java 8 installed, JAVA_HOME pointed to its main folder (e.g. C:\Program Files\Java\jdk1.8.0_45) and the PATH environment variable pointed to its bin sub folder (e.g. C:\Program Files\Java\jdk1.8.0_45\bin).
Your path may also contain “C:\ProgramData\Oracle\Java\javapath”, you may need to remove this \ delete the java executables in that \ add the bin folder before this in the path.
Once Eclipse is opened and your workspace initialised take the following steps to switch back to Java 7. If you do not do them all you may see an error like “Version 1.7.0_80 of the JVM is not suitable for this product. Version: 1.8 or greater is required.”
-
- Change JAVA_HOME back to the Java 7 folder (e.g. C:\Program Files\Java\jdk1.7.0_80)
- Change the Java path bin to Java 7 (e.g. C:\Program Files\Java\jdk1.7.0_80\bin)
- In Eclipse go to Window -> Preferences -> Java -> installed JREs and select the Java 7 jdk folder
- In Eclipse go to Window -> Preferences -> Java -> Compiler & select Java 7
- With Eclipse closed open the eclipse.ini & add the following line for your appropriate Java 8 directory. Without this final step I still got the incompatible message:
- -vm C:\Program Files\Java\jdk1.8.0_45\bin