Impossible to change "Runtime JRE"


Recently I have installed new versions of Eclipse for C++ and JAVA to work on different projects. During the installation of the new eclipse it also install new JAVA version (but it also keep the JAVA8 required by MicroEJ)

My problem is:

Now when MicroEJ SDK starts, the “Runtime JRE” parameter from “Window > Preferences > MicroEJ > Module Manager” is configured to “java-11-openjdk-amd64” and I can’t change it because this is the unique choice in the list, so I can’t build my MicroEJ project:

=============== [ Initialization Stage ] ===============
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by (file:/.............../ARM9-GNUv55_arm-scos-linux-gnueabi-1.0.0/source/tools/ant/lib/ant-1.0.0.jar) to field
WARNING: Please consider reporting this to the maintainers of
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
=============== [ Launching SOAR ] ===============

Could not create type soarTask due to java.lang.ClassFormatError: Class name is empty or contains illegal character in descriptor in class file com/is2t/mowana/soar/product/C

I try many things that doesn’t help:

First idea: Make sure /usr/bin/java points to /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

$ update-alternatives --list java

$ sudo update-alternatives --config java
Il existe 2 choix pour l'alternative java (qui fournit /usr/bin/java).

  Sélection   Chemin                                          Priorité  État
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      mode automatique
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      mode manuel
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      mode manuel

$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 oct.   4  2021 /usr/bin/java -> /etc/alternatives/java

$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 46 avril  4 17:10 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

→ No success

Second idea: Try to force MicroEJ SDK to use java 8 by editing MicroEJ-SDK.ini:



→ No success

I also try to run MicroEJ like this:

./MicroEJ-SDK -vm /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

→ No success

I also try to set JAVA_HOME before launching MicroEJ:

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

→ No success


  • Why when JAVA11 is installed, we can’t select JAVA8 in the list of “Runtime JRE” ?
  • How did you get this list ? Which command / algorithm ?
  • How to force usage of JAVA8 instead of JAVA11 …?


  • I know that if I uninstall JAVA11, JAVA8 will appear on the list […], But this is not a solution because i need JAVA 11 to be installed for my other eclipse installations.

My configuration:

  • MicroEJ SDK Version: Dist. 21.11
  • OS: Ubuntu 20.04.4 LTS


The list of the available “Runtime JRE” in “Window > Preferences > MicroEJ > Module Manager” is built from the Installed JREs in “Window > Preferences > Java > Installed JREs". You can add the JDK 8 in this list, it should then be available in the MicroEJ Runtime JRE list.

The list of Installed JREs is initialized only at the workspace creation with the JRE/JDK used to execute Eclipse. Did you try to create a new workspace after setting the argument “-vm” to your JDK 8 in MicroEJ-SDK.ini? You should see your JDK 8.

Hope this helps.