Old java version after reinstall

With the command:

java -version

the result is:

openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-b09)
OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)

although I installed openjdk19. This results in an error starting a java application that is compiled with newer java.
How can I get rid of openjdk 1.8.0?
Thank you
Matthias

You can have multiple versions of Java installed and can choose which is used by default. See Java - ArchWiki

Thank you, that solved it.

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