SmartCode: Error: Java was started but returned exit code=X

12-Nov-2024

The SmartCode Eclipse IDE requires a 64-bit Java Runtime Environment (JRE) v11 or higher. Typically, this JRE is installed when the SmartCode product is installed, provided the installer does not detect an existing JRE installation.

However, due to the installation of other products that require a different JRE version, a different JRE version might be used when launching the SmartCode Eclipse.  If this JRE version is not compliant, it can cause a launch error like:

Java was started but returned exit code=X
....


Possible solution

To mitigate this, it is possible to define which JRE version the TASKING SmartCode Eclipse environment should use, as described in the use case below.

Suppose the 64-bit JRE version is used and is located in the directory C:\Program Files\AdoptOpenJDK\jre-11.0.10.9-openj9:

1. Modify the eclipse.ini file in the \eclipse sub-directory of the SmartCode installation directory, for example:
C:\Program Files\TASKING\SmartCode v10.1r1\eclipse
.

Add the following two lines at the beginning of eclipse.ini:

-vm
C:\Program Files\AdoptOpenJDK\jre-11.0.10.9-openj9\bin\javaw.exe


2. Relaunch the SmartCode Eclipse IDE.

If you need to reinstall the JDK version included in the SmartCode installation, you can execute the file named
OpenJDK11U-jre_x64_windows_openj9_windowsXL_11.0.10_9_openj9-0.24.0.msi
which is located in the ctc\reinstall sub-directory of the SmartCode installation.


More resources

Was this answer helpful?