Jenkins final lab: nodes can't be launched

when I launch the nodes, i get the following error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I’ve researched online, but i can’t find any usable solutions

Solved the problem. Both dev and prod servers were running java v1.8
Per jenkins online manual, jenkins versions post 2.3 need at least java v11.
I installed java 11 in both dev and prod servers. After that, i ran the command

java -version

but it was still pointing to the old v1.8.

Then I ran

sudo update-alternatives --config java

And selected java v11 for default version. Tested with

java -version

and it’s pointing to v11.