Hello everyone,
I am currently upgrading an old Java project and running into a runtime configuration issue. When I compiled my source code using a newer JDK version and tried to execute the compiled .class file on a server running an older JRE, I received the following error message:
"java.lang.UnsupportedClassVersionError: Unsupported major.minor version 61.0"
I understand this happens due to a mismatch between the compiler version and the runtime environment version.
Could anyone please guide me on the best way to resolve this? Should I downgrade my JDK compilation target or upgrade the server environment? If downgrading is preferred, what are the specific compiler flags or IDE settings I should modify?
Any detailed explanation or step-by-step solution would be highly appreciated. Thank you!