Exception in thread "main" java.lang.UnsupportedClassVersionError: client :
Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Unsupported major.minor version is a Java version mismatch error you get when you compile and run your applications on two different versions or java (example java 7 and java 8)
Resolution:- Go to Eclipse -> Preferences
- Go to Java -> Installed JRE (say its JAVA SE 8)
- Now Right Click on your Project directory -> Properties
- Go to Java Build Path -> Libraries
- Here too the JRE must be the same (say JAVA SE 8), if not change it.
More Posts related to Java,
- How to Get List of All Country Codes in Java Using Locale Class
- Unsupported major.minor version 52.0 in java
- Java - How to set custom thread name?
- Get the current timestamp in Java
- Java Spring Boot 3 Web Hello World with Gradle in IntelliJ
- [fix] NullPointerException Cannot Invoke findById because Repository is null - Java Spring
- java: unclosed string literal [Error]
- Convert Java Byte Array to String with code examples
- Error: Can not find the tag library descriptor for
- Java 8 - Convert List to Map Examples
- Java - Calculate time taken for the code to execute in milliseconds or nanoseconds
- Fix java.net.ProtocolException: Invalid HTTP method
- Java: Convert Stream to List
- Java equals method - Tutorial
- List of Java JDBC Database Driver Jars, Classes and URLs Details
- Read YAML file Java Jackson Library
- How to display Java Date Time timezone GMT/UTC offset using SimpleDateFormat
- List of Java Keywords
- Enable JSON Pretty Print in Java Jackson
- How to Word-Warp Console logs in IntelliJ
- Convert Map to List in Java 8 using Stream API
- Create a Directory using Java Code
- Ways to Convert Integer or int to Long in Java
- [Program] How to read three different values using Scanner in Java
- Java JDBC Example with Oracle Database Driver Connection
More Posts:
- Change the background of Tkinter label or text - Python
- Disable Fading Edges Scroll Effect Android Views - Android
- How to adjust MacBook Desktop icons size - MacOS
- connection.url property value in hibernate.cfg.xml for mysql - Java
- Tutorial : Simple Lightweight Pure CSS based Vertical Navigation Menu - CSS
- [Solution] Mac Update Stuck Preparing macOS Ventura 13.0 About 30 minutes remaining - MacOS
- Eclipse Java: Multiple markers at this line error - Eclipse
- Save webpage as pdf in Google Chrome for Mac OS X - Mac-OS-X