Why am I seeing an "JVM terminated. Exit code = -1" error when I try to start EclipseEclipse and how can I fix it?

Eclipse cannot get a continuous block of memory of the size specified by the -Xmx value, which prevents the DITA CMS from opening.

Symptom

When you try to start Eclipse, you receive an error message with JVM terminated. Exit code -1, as shown below:

Problem

This error occurs when you run a 32-bit version of Eclipse on Windows, and Eclipse cannot get a continuous block of memory of the size specified by the -Xmx value in the eclipse.ini file.

For the technical details about this issue, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968.

Solution

You can resolve the issue by following one of these solutions:

Method Procedure
Reduce the -Xmx value to a lower value
  1. Open the eclipse.ini file located in the Eclipse installation directory. For example, in C:\eclipses\eclipse-SDK-4.3.2-win32-x86_64.
  2. Reduce the value set for -Xmx. For example, if the value is set as -Xmx1024m, try setting it to -Xmx512m.
  3. Save the file.
  4. Restart Eclipse.
Edit the Eclipse shortcut
  1. Right-click the DITA CMS Eclipse shortcut.
  2. Click Properties.
  3. In the Target box, add -vm c:\path\to\the\java\bin\javaw.exe to the target statement. For example,
    C:\eclipses\eclipse-SDK-4.3.2-win32-x86_64-test-4.2\eclipse.exe -vm c:\path\to\the\java\bin\javaw.exe
  4. Click OK.
  5. Restart Eclipse.
Use a 64-bit version of Eclipse If the host machine has a 64-bit operating system and you are not using XMAX, try installing the 64-bit version of Eclipse instead.