

And under Java -> Compiler you could choose an older Java compliance if you wish. I don't know how to do that for the Arduino IDE.įor 2.: In Eclipse you can select the JRE/JDK to be used in Window -> Preferences -> Java -> Installed JREs. Sudo update-alternatives -install /usr/bin/java java /usr/lib/jvm/jdk-12.0.1/bin/java 2082Īs for switching for different development environments:Īre you talking about starting the IDE itself with different Java versions or using different versions in the IDE for compilation and running your app?įor 1.: You can specify which JVM to use in the eclipse.ini, as described here. As alternative, you configure alternatives without update-java-alternatives:įor example, to add java from jvm-directory /usr/lib/jvm/jdk-12.0.1 ( default directory of Debian package of Oracle) with priority 2082, use the following command: jinfo file, the jdk of Oracle (formerly Sun) is not. Update-java-alternatives requires presence of a file with extension. Using the first commands, you can use a Java VM and Java Compiler from different JDKs. However, using update-java-alternatives with a JDK Version changes both programs for me. I can see, that each command changes the program being used. If I check which version is being used by issuing the command You can also see that, because the first command lists a lot of "JRE" (Java Runtime Environment) folders and the Program is just called "java".

Configures the default for the program "java".
