Questions tagged [unsupported-class-version]

An UnsupportedClassVersionError is thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported. The canonical answer about what is UnupportedClassVersionError and how to fix it: https://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsupported-major-minor-versi

An UnsupportedClassVersionError is thrown when the Java Virtual Machine attempts to read a class file and determines that the major and minor version numbers in the file are not supported.

It is typically fixed by using the cross-compilation options of the compiler to specify the minimum Java version the application claims compatibility with.

122 questions
1718
votes
51 answers

How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version

I am trying to use Notepad++ as my all-in-one tool edit, run, compile, etc. I have JRE installed, and I have setup my path variable to the .../bin directory. When I run my "Hello world" in Notepad++, I get this…
ERJAN
  • 23,696
  • 23
  • 72
  • 146
680
votes
26 answers

Unsupported major.minor version 52.0

Pictures: Command Prompt showing versions Picture of error Hello.java import java.applet.Applet; import java.awt.*; public class Hello extends Applet { // Java applet to draw "Hello World" public void paint (Graphics page) { …
user3397452
  • 6,961
  • 4
  • 14
  • 10
141
votes
7 answers

java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0

I am trying to build an application, but it gives some error. My JDK version is given below: java version "1.6.0_30" Java(TM) SE Runtime Environment (build 1.6.0_30-b12) Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing) Here is my…
vivek rai
  • 2,109
  • 10
  • 25
  • 21
114
votes
6 answers

Maven Installation OSX Error Unsupported major.minor version 51.0

I installed maven by following this steps:(a tutorial) JAVA_HOME=/Library/Java/Home export M2_HOME=/Users/steven/zimmermann/maven export M2=$M2_HOME/bin export PATH=$M2:$PATH echo $JAVA_HOME echo $M2_HOME echo $M2 echo $PATH nano…
Steven
  • 1,262
  • 2
  • 10
  • 11
91
votes
10 answers

ERROR Source option 1.5 is no longer supported. Use 1.6 or later

It all happens when I was trying to build a springboot application by ./mvnw clean install When I first run the install command, it runs into following problem. [INFO] ------------------------------------------------------------------------ [INFO]…
90
votes
5 answers

Exception in thread "main" java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)

Possible Duplicate: unsupported major .minor version 51.0 I installed JDK7, a simple hello word program gets compile but when I run this I got following exception. Exception in thread "main" java.lang.UnsupportedClassVersionError: a (Unsupported…
Adnan
  • 4,517
  • 15
  • 44
  • 54
82
votes
8 answers

Java 6 Unsupported major.minor version 51.0

I recently uninstalled Java 8, to use Java 6 as I want my code/creations to be usable by more people than just those on Java 8. When I do mvn - version it returns: Exception in thread "main" java.lang.UnsupportedClassVersionError:…
Hassan Syyid
  • 1,559
  • 1
  • 13
  • 24
54
votes
4 answers

java.lang.UnsupportedClassVersionError

When I ran a java program I received this error.. Could you please suggest why do we get this error: Exception in thread "main" java.lang.UnsupportedClassVersionError: GenerateInvoice (Unsupported major.minor version 49.0) at…
user1614043
  • 571
  • 1
  • 4
  • 8
51
votes
2 answers

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]]

org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CollegeWebsite]] …
Abhi
  • 533
  • 1
  • 4
  • 8
33
votes
2 answers

Unsupported major.minor version 51.0 but everything is set to JDK 1.6

I have a Maven Eclipse application which I'm trying to run through the command prompt using the following command: java -cp target/classes;"target/dependency/*" com.example.Main Unfortunately, it throws an error: UnsupportedClassVersionError :…
Pieter-Jan
  • 1,675
  • 2
  • 19
  • 25
32
votes
5 answers

Android Studio Error "Unsupported class file major version 61"

I moved my Android Studio project from one computer to another computer and now I get this error: "Unsupported class file major version 61" . How can I fix this?
Ola Ström
  • 4,136
  • 5
  • 22
  • 41
22
votes
5 answers

Resolving version conflict between java and javac on Ubuntu

I have a problem with my compiled Java application on Ubuntu. It throws UnsupportedClassVersionError. I am compiling with a higher JDK version than the one that is configured in my PATH to run Java: $ javac -version javac 1.7.0_147 $ java…
xralf
  • 3,312
  • 45
  • 129
  • 200
11
votes
3 answers

Java Stacktrace error Unsupported major.minor version 51.0

Possible Duplicate: unsupported major .minor version 51.0 I made this script, and it gives me this error: java.lang.UnsupportedClassVersionError: net/glitching/client : Unsupported major.minor version 51.0 at…
Ryan Glenn
  • 1,325
  • 4
  • 17
  • 30
10
votes
4 answers

java.lang.UnsupportedClassVersionError: bad major version at offset=6

I have deployed a WAR file in the webapps folder in my tomcat. And when I am starting my tomcat, like below C:\apache-tomcat-6.0.35\bin>startup.bat Using CATALINA_BASE: "C:\apache-tomcat-6.0.35" Using CATALINA_HOME: …
arsenal
  • 23,366
  • 85
  • 225
  • 331
8
votes
3 answers

Error: A JNI error has occurred, please check your installation and try again - during running Java program from Ubuntu terminal

I'm trying to run a simple client-server program written in Java through Ubuntu terminal. I could compile the code successfully unfortunately, I can't run the code. Server class code: import java.io.IOException; import…
Mamun
  • 375
  • 2
  • 8
  • 17
1
2 3
8 9