Skip to content

Fixing Eclipse "Incompatible JVM" Error on Windows, macOS, and Linux

When installing or upgrading Eclipse IDE, you may encounter the error message: "Incompatible JVM. Version 1.8.0_261 of the JVM is not suitable for this product. Version: 11 or greater is required." This occurs because newer versions of Eclipse (2020-09 and later) require Java 11 or higher to run the IDE itself, even if you're developing projects with older Java versions.

The most reliable solution is to explicitly tell Eclipse which Java Virtual Machine to use by modifying the eclipse.ini configuration file.

Windows

  1. Navigate to your Eclipse installation directory
  2. Locate and open eclipse.ini in a text editor
  3. Add these lines before the -vmargs section:
ini
-vm
C:\Program Files\Java\jdk-11.0.9\bin\javaw.exe
  1. Save the file and restart Eclipse

macOS

  1. Right-click on the Eclipse application and select "Show Package Contents"
  2. Navigate to Contents/Eclipse/
  3. Open the .ini file (e.g., eclipse.ini or MemoryAnalyzer.ini)
  4. Add these lines before -vmargs:
ini
-vm
/Library/Java/JavaVirtualMachines/jdk-11.0.12.jdk/Contents/Home/bin
  1. Save the file and restart Eclipse

Linux

  1. Open a terminal and navigate to your Eclipse installation directory
  2. Open eclipse.ini in a text editor
  3. Add these lines before -vmargs:
ini
-vm
/usr/lib/jvm/adoptopenjdk-14-openj9-amd64/bin/java
  1. Save the file and restart Eclipse

TIP

Make sure to use the correct path to your Java installation. You can find this by running java -version in your terminal/command prompt and locating the installation directory.

Solution 2: Using JVM DLL (Alternative for Windows)

If specifying the javaw.exe path doesn't work, try pointing to the jvm.dll file instead:

ini
-vm 
C:\Program Files\Eclipse Adoptium\jre-11.0.14.101-hotspot\bin\server\jvm.dll

Solution 3: Set System Default Java Version

For Linux users, you can set the system-wide default Java version:

  1. Check installed Java versions:
bash
ls /usr/lib/jvm
  1. Set the default version (example for Java 16):
bash
sudo archlinux-java set java-16-jdk

Solution 4: Install Eclipse with Bundled JRE

Download Eclipse from the official website using the installer that includes a JRE:

  1. Visit https://www.eclipse.org/downloads/
  2. Download the installer version (e.g., eclipse-inst-jre-win64.exe)
  3. This version includes a compatible Java runtime environment

WARNING

Even if you run Eclipse with Java 11+, you can still develop projects using older Java versions (down to Java 1.1). The JVM requirement only applies to running the Eclipse IDE itself.

Troubleshooting Tips

If you continue to experience issues:

  1. Verify Java installation: Run java -version to confirm you have Java 11+ installed
  2. Check PATH variable: Ensure your Java bin directory is in the system PATH
  3. Reinstall Eclipse: Sometimes a clean reinstall resolves the issue
  4. Use Eclipse JustJ: Install Java 11+ as a plugin from Eclipse JustJ

Common Mistakes to Avoid

  • Don't modify the -Dosgi.requiredJavaVersion value - this specifies the minimum requirement, not the runtime JVM
  • Ensure the -vm parameter and path are placed before -vmargs in the .ini file
  • Use the correct path separators for your operating system
  • Verify that the specified Java installation is 64-bit if using a 64-bit Eclipse

By following these solutions, you should be able to resolve the incompatible JVM error and successfully run Eclipse with Java 11 or higher.