i'm trying to run a project from Spring Initializr and I am getting the error java.lang.UnsupportedClassVersionError when I try to run the Main. The complete error is java.lang.UnsupportedClassVersionError: has been compiled by a more recent version of the Java Runtime (class file version 62.0), this version of the Java Runtime only recognizes class file versions up to 55.0. The gradle is set to jvmTarget = 18 but aparrently when I put it to 11 it seem to fix the problem. I want to know why when I downgrade the version the program work.
Error when run program in jvm 18: Java.lang.UnsupportedClassVersionError
801 Views Asked by OdisBy At
2
There are 2 best solutions below
Related Questions in KOTLIN
- Volatile properties in Kotlin?
- Using multiple JVM languages in the same project
- Kotlin - IntelliJ Project Setup
- Kotlin let analogue which returns the receiver
- Kotlin 'when' statement vs Java 'switch'
- Use Kotlin extension in android java class
- Kotlin stub/placeholder function for unimplemented code
- Partial class delegation in Kotlin
- SugarORM + Kotlin: Unresovled reference "listAll"
- Kotlin JS - string to number conversion?
- Where is the old Kotlin specification hosted?
- Kotlin JS - Accessing HTML DOM properties
- Access property delegate in Kotlin
- Kotlin-JS interop - using language constructs
- Does "internal" visibility modifier in Kotlin work yet?
Related Questions in GRADLE
- Gradle. Detect dependencies problems
- Gradle Duplicate Entry
- Creating distribution with repackaged spring boot jar using gradle application plugin
- LinkageError after upgrading dropwizard to 0.8.1
- Android Studio unable to run the project
- Add JVM args to spring boot application
- How do I know what is available in minSdkVersion in Android Studio?
- Gradle: Override transitive dependency by version classifier
- gradle get System environment variables
- Why does Eclipse want to download a previous version of Gradle when I already have a later version installed?
- Gradle project sync failed - Gradle DSL method not found: android()
- Use thymeleaf template for some pages and rest for some for building gradle project
- 'Provided' dependency in Gradle
- Invalid Gradle JDK configuration found
- Does Android Studio use Gradle Daemon?
Related Questions in INTELLIJ-IDEA
- How to Enable MultiDex Support in Intellij IDEA
- Where has "Show Type Info on Mouse Motion" gone in Intellij 14
- Simple JavaEE HTML GET/POST application
- Behaviour Difference: Intellij vs Eclipse
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- Perforce workspaces and multiple branches
- How to invoke method/constructor parameter hint in IntelliJ?
- Breakpoint "concurrency" in Intellij
- How do I install Intellij on Ubuntu 15.04?
- How to disable Code Completion in Android Studio?
- How to unchain my program?
- How can I debug scala.js unit tests?
- Weblogic 12c web application not start properly after server reboot
- What is the principle of IntelliJ IDEA's remote debug?
- Node.js setup on Intellij Idea
Related Questions in ANDROID-GRADLE-PLUGIN
- Gradle Duplicate Entry
- How to Install Google Play Services GMS SDK on CircleCI
- android studio upgrade to 1.2.1.1 results in "local path doesnt exist" error
- I gained this error in my gradle and i don't seem to understand what's happening. My gradle file is printed below
- Error in building project in Android Studio
- Code Path per Flavor in Android Gradle
- What does the "Test Artifact" selector do in Android STudio
- java.lang.NoClassDefFoundError on android studio
- Android: Managing different server URL for development and release
- Android NDK - multlib support using gradle
- How to specify dependencies in aar library?
- Android Crashlytics ndk; values of NdkOut and NdkLibsOut in build.gradle
- Android: Couldn't load mupdf
- Aidl is missing error
- Gradle Build Failure
Related Questions in JAVA-RUNTIME-COMPILER
- Recompile with new class definition for mutation testing
- Automatic and seamless way to install a JVM
- A JNI error has occured when running exe file
- Issue executing a java compiled file from java source
- How to implement type information for static code analylsis tool for a custom JVM language?
- multiple JVM issue in application
- IntelliJ: Fatal error compiling: invalid target release: 1.8
- Show output while execute long-time running command Java without waiting RuntimeExec
- Why cant i run Jar file in Windows?
- How to fix "An unrecoverable stack overflow has occurred... Java returned: -1073741819" error on java?
- Installing CPLEX causes a problem in MacOS Big Sur
- Getting the latest Java Runtime Enviroment parent folder
- If RNetlogo is no longer being maintained, can I still use it? Running into errors
- UnsupportedClassVersionError : Error with Gradle and Java Runtime version
- Java Runtime -ERR 'fsctl Command not found
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This error shows that you use older JRE version to run than to build. Your setup in gradle, you have to check what is your runtime version.
It seems you use IntelliJ. Go to File > Project Structure > Project > SDK - check if you have the Java 18 set here. You can also check in Run Configuration if there is proper JVM set.
Check also the JAVA_HOME env variable and set this variable to point to your recent JDK.