Java Exception Stack Trace:
java.lang.UnsupportedClassVersionError: Main :
Unsupported major.minor version 63.0
The Unsupported major.minor version error occurs when the Java runtime environment (JRE) is not able to run a Java class file because it was compiled with a higher version of Java than the one currently installed.
In this specific case, the "63.0" version number refers to Java 20, which is not supported by the version of Java installed on the system.
List of Java Major Versions
Java Version | Major Version |
---|---|
* JDK 21 | 65 |
JDK 20 | 64 |
JDK 19 | 63 |
JDK 18 | 62 |
JDK 17 | 61 |
JDK 16 | 60 |
JDK 15 | 59 |
JDK 14 | 58 |
JDK 13 | 57 |
JDK 12 | 56 |
JDK 11 | 55 |
JDK 10 | 54 |
JDK 9 | 53 |
JDK 8 | 52 |
JDK 7 | 51 |
JDK 6 | 50 |
JDK 5 | 49 |
JDK 1.4 | 48 |
JDK 1.3 | 47 |
JDK 1.2 | 46 |
JDK 1.1 | 45 |
Java JDK 21 is due to be released in September 2023.
Possible Fixes:
Recompile your source code with a lower version of Java that is supported by the current target system.
Or update the Java JDK version to the version (in our case JDK 20) on your target system.
If you're using an IDE like Eclipse or IntelliJ, make sure you have set the current versions in the module/project configuration.
To fix this issue JDK used to compile the Java code and the Java version is used to run the code must be compatible with the minimum Java version required by your target environment.
Fix the issue in Eclipse
- In Eclipse and navigate to the project that is causing the error
- Right-click on the project in the "Package Explorer" view and select "Properties".
- Click on "Java Build Path" and then select the "Libraries" tab.
- Check the Java version that is being used in the project's classpath.
- In the "Properties" dialog, click on "Java Compiler" and check the "Compiler compliance level" setting. Make sure that it matches the Java version used in the project's classpath.
- If the Java version used in the classpath is higher than the Java version used by the compiler, change the Java version used in the classpath to match the compiler version. To do this, select the Java version in the classpath and click the "Edit" button to change it.
After changing the Java version, clean and rebuild the project to ensure that the code is compiled with the correct version of Java and run the code again and check if the error is resolved.
Fix the issue in IntelliJ
- Open IntelliJ and navigate to the project that is causing the error.
- Right-click on the project in the "Project" view and select "Open Module Settings" (or press keyboard shortcut F3)
- Click on "Project Settings" and then select "Modules" and check the Java version that is being used in the project's module.
- In the "Project Structure" dialog, click on "Project Settings" and then select "Project".
- Check the "Project SDK" setting and make sure that it matches the Java version used in the project's module.
- If the Java version used in the module is higher than the Java version used by the compiler, change the Java version used in the module to match the compiler version. To do this, select the Java version in the module and click the "Edit" button to change it.



After changing the Java version, clean and rebuild the project to ensure that the code is compiled with the correct version of Java and run the code again and check if the error is resolved.
Fix issue in VS Code
- Open VS Code and navigate to the project that is causing the error.
- Open the "Explorer" view in VS Code and navigate to the project's directory.
- Check the Java version that is used in the project's build settings or configuration files, such as the pom.xml file in a Maven project or the build.gradle file in a Gradle project.
- Open the project's build settings or configuration files and check the Java version used by the compiler.
- If the Java version used in the build settings or configuration files is higher than the Java version used by the compiler, change the Java version used in the build settings or configuration files to match the compiler version.
After changing the Java version, clean and rebuild the project to ensure that the code is compiled with the correct version of Java and run the code again and check if the error is resolved.
Facing issues? Have Questions? Post them here! I am happy to answer!
- Convert Java Map Collection Object to JSON String using Jackson
- Java Stream flatmap() Examples
- [Fix] Instant java.time.temporal.UnsupportedTemporalTypeException: Unsupported unit: Years
- How to run Java Unit Test cases with Apache Maven?
- How to check if Java main thread is alive
- [Fix] java: incompatible types: incompatible parameter types in lambda expression error
- Parsing CSV file using Java code example (Comma Separated File)
- Unhandled exception type InterruptedException : Java Threads
- Native getClass() method from java.lang.Object Class Explained with examples.
- Java Jackson ObjectMapper Class with Examples
- Java 8 Streams map() with examples
- Java 8 - Convert List to Map Examples
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- Java Stream with Multiple Filters Example
- How to Clear StringJoiner in Java 8
- Spring 5 IoC Example with application Context XML (ClassPathXmlApplicationContext) and Gradle.
- How to get end of line (EOL) or new line character \r \n in Java
- Spring Boot CRUD Examples using JDBCTemplate
- Delete a File in Java with Examples
- Implementing Insertion Sort Algorithm in Java Program
- Java JDBC Batch Update Example with PreparedStatement
- Java JDBC Select Multiple Records from table as List using PreparedStatement
- [Hibernate] The method buildSessionFactory() from the type Configuration is deprecated
- How to fix Java HTTP java.net.UnknownHostException
- Java 8 Display time in 12 hour AM PM format
- Show Desktop Keyboard Shortcut on Mac - MacOS
- [Mac] Localhost at port 80 says It Works! - MacOS
- How to Run PowerShell Script (.ps1) on Mac - MacOS
- W3 : character data is not allowed here html validation error - Html
- How to turn off auto period after double-space on Mac - MacOS
- How to change user image icon macOS Big Sur - MacOS
- How to Upload a File to Google Colab (txt, csv, json, xml, xlsx) - Google
- Android : Exception raised during rendering: action_bar API 22 - Android