Hey folks. I’m coming back to Jenkins after about 2 years and I’m a bit lost with how agents are meant to work now. Previously, I used to be able to download and run the agent java file to keep agents alive (Windows). Now when I do this I get only a jlnp config file? I noticed that maybe I need agent.jar too and try to run it with:
java -jar agent.jar -jnlpUrl http://[URL]/manage/computer/AGENT%5FID%5F33/jenkins-agent.jnlp -workDir "C:\GameRigger"
However I get the following error on Windows:
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
Which confuses me coz the Java version is fully up to date on the Windows client (Java v8 361). Any help would be appreciated!
You didn’t include the version of Jenkins you use but latest are not compatible with Java 8 anymore.
In the error message:
class file version 55.0
This is Java 11.
this version of the Java Runtime only recognizes class file versions up to 52.0
This is Java 8.
So update the jdk you use on your agent to a jdk 11.
Thanks Pierre! I actually just figured this out myself moments ago - Seems we need to install JDK 11 instead of JRE now.