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.
Have Questions? Post them here!
- Create a Zip file using Java Code programmatically
- Eclipse : A java Runtime Environment (JRE) or Java Development kit (JDK) must be available
- How to Sort a LinkedList in Java
- Loading class com.mysql.jdbc.Driver. This is deprecated. The new driver class is com.mysql.cj.jdbc.Driver
- How to declare and initialize Array in Java Programming
- [Fix] java: integer number too large compilation error
- Java JDBC Connection with MySQL Driver in VS Code + Troubleshooting
- Reading .xls and .xlsx Excel file using Apache POI Java Library
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- How to get Client IP address using Java Code Example
- Truncate table using Java JDBC Example
- Struts 2 : There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]
- How to get file path in Idea IntelliJ IDE
- Java Generics explained with simple definition and examples
- Java SE 8 Update 301 available with various bug fixes and security improvements
- Java: Collect Stream as ArrayList or LinkedList
- Java JDBC Connection with PostgreSQL Driver Example
- How to check if Java main thread is alive
- How to fix Java nio NoSuchFileException wile reading a file
- Java 8+ get Day of the Week Examples with LocalDateTime, DateTime, ZonalDateTime and Instant classes
- Ways to Convert Integer or int to Long in Java
- [Java] How to throws Exception using Functional Interface and Lambda code
- [Fix] Spring Boot: mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- Java: The value of the local variable string is not used
- Java JDBC: Insert Java 8 LocalDate and Time using PreparedStatement
- PHP 301 Redirect Permanently - PHP
- Python raise error with message example - Python
- Fix: Error code: 0x204 Microsoft Remote Desktop - Unable to connect the remote PC. - Windows
- JSON Datatypes : Tutorial - Json-Tutorial
- [fix] Chrome: no listeners for an event URLS_SAFE_CHECK__STATUS_UPDATED - Chrome
- AlertDialog with no buttons (just text message) - Android
- Get count of SharePoint List or Document Library Items using PowerShell - SharePoint
- Create a Database Table using JDBC PreparedStatement - Java