The "Unsupported major.minor version 65" occurs when your Java code has been compiled with Java JDK version 21 (the latest LTS version) and you are currently trying to run this code (bytecode to be precise) on a Java version that lower than Java 21.
You can check your installed Java version by running the command java -version on Terminal.
You can update your Java version installed on your device to Java 21.
Option 2:
If the code is yours, you will need to recompile your Java code with a target Java version that is compatible with the Java version installed on your device.
Say you are on Java version 17, then you will need to compile your code again in the following way using the javac compiler command.
javac -source 17 -target 17 MyClass.java
If you are working with a project in Eclipse, IntelliJ, or VS Code IDE, then make sure to update your build files to use the target as your installed Java version as follows.
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!