OpenJDK multiversions : how to run/switch to latest Java between the two - Manjaro XFCE

I've downloaded a java app that requires at OpenJDK11 or later, namely

Running Manjaro XFCE with latest updates.
Pamac says OpenJDK full rt environment
13.0.1.u9-1 is installed
as well as
8.232-1 is installed

[angetosh@angetosh-pc EdiNos]$ java -version
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-b09)
OpenJDK 64-Bit Server VM (build 25.232-b09, mixed mode)

So I see that by default Manjaro runs Java8, how to run Java13 so that the app will execute??


I recommend a forum search.

I did, but my knowledge is limited, that's why I posted a question.

I presume if by default it's OpenJDK 8, it's because some app(s) is/are dependant on it and will fail on later JDK.
Changing the default OpenJDK, won't it break installed apps?
If not, why not simply uninstall OpenJDK 8??
Can't one imagine that one app needs OpenJDK8, while another app needs OpenJDK11+?

I tried

It might.

You sure can.

That's the one I use to alter the default java environment.
You can go forth and back as you like.

Usually one can also, instead of switching the default, change jvm per application.
How you do that depends on the application in question.
For edinos you might try something like
/path/to/jvm/bin/java -jar /path/to/edinos-3.5.0.jar
/usr/lib/jvm/java-11-openjdk/bin/java -jar edinos-3.5.0.jar

1 Like

Thanks it works.
Also good to know:
in Thunar, if one is right clicking on the jar file, it proposes to execute not with the default OpenJDK, but with the other version.

Please mark @trixon's post as solution instead of editing thread titles.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by