exerror.com Open in urlscan Pro
2606:4700:3031::ac43:9e30  Public Scan

URL: https://exerror.com/main-has-been-compiled-by-a-more-recent-version-of-the-java-runtime-class-file-version-57-0-this...
Submission: On June 10 via manual from JP — Scanned from JP

Form analysis 2 forms found in the DOM

GET https://exerror.com/

<form method="get" class="search-form navigation-search" action="https://exerror.com/">
  <input type="search" class="search-field" value="" name="s" title="Search">
</form>

POST https://exerror.com/wp-comments-post.php

<form action="https://exerror.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate="">
  <p class="comment-form-comment"><label for="comment" class="screen-reader-text">Comment</label><textarea id="comment" name="comment" cols="45" rows="8" required=""></textarea></p><label for="author" class="screen-reader-text">Name</label><input
    placeholder="Name *" id="author" name="author" type="text" value="" size="30" required="">
  <label for="email" class="screen-reader-text">Email</label><input placeholder="Email *" id="email" name="email" type="email" value="" size="30" required="">
  <label for="url" class="screen-reader-text">Website</label><input placeholder="Website" id="url" name="url" type="url" value="" size="30">
  <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"> <label for="wp-comment-cookies-consent">Save my name, email, and website in this browser for the next time
      I comment.</label></p>
  <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="Post Comment"> <input type="hidden" name="comment_post_ID" value="2469" id="comment_post_ID">
    <input type="hidden" name="comment_parent" id="comment_parent" value="0">
  </p>
  <p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="521c01cfef"></p>
  <p style="display: none !important;"><label>Δ<textarea name="ak_hp_textarea" cols="45" rows="8" maxlength="100"></textarea></label><input type="hidden" id="ak_js_1" name="ak_js" value="1654826403577">
    <script>
      document.getElementById("ak_js_1").setAttribute("value", (new Date()).getTime());
    </script>
  </p>
</form>

Text Content

Skip to content

Menu
 * Home
 * About Us
 * Contact Us
 * Privacy Policy
 * T & C




[SOLVED] MAIN HAS BEEN COMPILED BY A MORE RECENT VERSION OF THE JAVA RUNTIME
(CLASS FILE VERSION 57.0), THIS VERSION OF THE JAVA RUNTIME ONLY RECOGNIZES
CLASS FILE VERSIONS UP TO 52.0

October 28, 2021 by admin

Hello Guys, How are you all? Hope You all Are Fine. Today I just updated
IntelliJ But I am facing following error Main has been compiled by a more recent
version of the Java Runtime (class file version 57.0), this version of the Java
Runtime only recognizes class file versions up to 52.0 in Java. So Here I am
Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

CLOSE Contents
 1. How This Error Occurs ?
 2. How To Solve Main has been compiled by a more recent version of the Java
    Runtime (class file version 57.0), this version of the Java Runtime only
    recognizes class file versions up to 52.0 Error ?
 3. Solution 1: make this setting in IntelliJ IDEA
 4. Solution 2: select SDK default
 5. Solution 3: add environment PATH
 6. Summary


HOW THIS ERROR OCCURS ?

I just updated IntelliJ But I am facing following error.

D:\MyProject\ProjectExcercise\src>java com.codewithmosh.Main
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: com/ssc/Main
has been compiled by a more recent version of the Java Runtime (class file
version 57.0), this version of the Java Runtime only recognizes class file
versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)


HOW TO SOLVE MAIN HAS BEEN COMPILED BY A MORE RECENT VERSION OF THE JAVA RUNTIME
(CLASS FILE VERSION 57.0), THIS VERSION OF THE JAVA RUNTIME ONLY RECOGNIZES
CLASS FILE VERSIONS UP TO 52.0 ERROR ?

 1. How To Solve Main has been compiled by a more recent version of the Java
    Runtime (class file version 57.0), this version of the Java Runtime only
    recognizes class file versions up to 52.0 Error ?
    
    To Solve Main has been compiled by a more recent version of the Java Runtime
    (class file version 57.0), this version of the Java Runtime only recognizes
    class file versions up to 52.0 Error First of all Select File in your
    Intellij IDEA. Then select Settings. Select Build, Execution, Deployment.
    Now, Gradle. Then, Gradle JVM. Select eg. Project SDK (corretto-1.8) (or any
    other compatible version). Then delete the build directory and restart the
    IDE. Second Solution is You need to add PATH environment setting. C:\Program
    Files\Java\jdk-13 you currently have there is not correct. You just need to
    add bin subdirectory for the latest JDK version at the top of the PATH list.
    java.exe executable is in C:\Program Files\Java\jdk-13\bin directory, so
    that is what you need to have in PATH. And your error will be solved.
    
    
 2. Main has been compiled by a more recent version of the Java Runtime (class
    file version 57.0), this version of the Java Runtime only recognizes class
    file versions up to 52.0
    
    To Solve Main has been compiled by a more recent version of the Java Runtime
    (class file version 57.0), this version of the Java Runtime only recognizes
    class file versions up to 52.0 Error First of all Select File in your
    Intellij IDEA. Then select Settings. Select Build, Execution, Deployment.
    Now, Gradle. Then, Gradle JVM. Select eg. Project SDK (corretto-1.8) (or any
    other compatible version). Then delete the build directory and restart the
    IDE. Second Solution is You need to add PATH environment setting. C:\Program
    Files\Java\jdk-13 you currently have there is not correct. You just need to
    add bin subdirectory for the latest JDK version at the top of the PATH list.
    java.exe executable is in C:\Program Files\Java\jdk-13\bin directory, so
    that is what you need to have in PATH. And your error will be solved.


SOLUTION 1: MAKE THIS SETTING IN INTELLIJ IDEA


 1. First of all Select File in your Intellij IDEA.
 2. Then select Settings.
 3. Select Build, Execution, Deployment.
 4. Now, Gradle.
 5. Then, Gradle JVM.
 6. Select eg. Project SDK (corretto-1.8) (or any other compatible version).
 7. Then delete the build directory and restart the IDE.


SOLUTION 2: SELECT SDK DEFAULT


 1. First of all Go to “Project Structure”.
 2. Then Select Project.
 3. Select Project language level.
 4. and select SDK default.
 5. This should use the same SDK for all project modules.
 6. Now, Your error should be solved.


SOLUTION 3: ADD ENVIRONMENT PATH

You need to add PATH environment setting. C:\Program Files\Java\jdk-13 and you
currently have there is not correct. You just need to add bin subdirectory for
the latest JDK version at the top of the PATH list. java.exe executable is
in C:\Program Files\Java\jdk-13\bin directory, so that is what you need to have
in PATH.



Add This in PATH variable.

C:\Program Files\Java\jdk-13\bin


SUMMARY



It’s all About this issue. Hope all solution helped you a lot. Comment below
Your thoughts and your queries. Also, Comment below which solution worked for
you?

Also, Read

 * Java 11 or more recent is required to run. Please download and install a
   recent JDK

Categories JAVA Tags java
Post navigation
[Solved] Java 11 or more recent is required to run. Please download and install
a recent JDK
[Solved] Error:java: invalid target release: 11


LEAVE A COMMENT CANCEL REPLY

Comment

Name Email Website

Save my name, email, and website in this browser for the next time I comment.





Δ



exerror.com specifically for sharing programming issues and examples. We’ll be
sharing some chunks of codes of PHP, Laravel Framework, CSS3, HTML5, MYSQL,
Bootstrap, CodeIgniter Framework, etc. Programming Language On our site, I am
sure you will find something good solution and a fine example Of Programming
Languages.


QUICK LINKS

 * Home
 * About Us
 * Contact Us
 * Disclaimer
 * Privacy Policy
 * Terms & Condition


CATEGORY

 * Python
 * Java
 * JavaScript
 * NodeJs
 * ReactJS
 * PHP

© Exerror 2022 All Right Reserved