Java unsupported major minor version 52.0

JavaHtmlApplet

Java Problem Overview


I can not launch my java application as a web applet in HTML (I am using HTML 4.01, I know it doesn't work in html5). The error message it returns is:

> java : Unsupported major.minor version 52.0

I have tried downgrading my java JRE/JDK/SDK but I still get the same error message. The current version of java I am now using is 1.8.0_05.

Java Solutions


Solution 1 - Java

Your code was compiled with Java Version 1.8 while it is being executed with Java Version 1.7 or below.

In your case it seems that two different Java installations are used, the newer to compile and the older to execute your code.

Try recompiling your code with Java 1.7 or upgrade your Java Plugin.

Solution 2 - Java

You have to compile with Java 1.7. But if you have *.jsp files, you should also completely remove Java 1.8 from the system. If you use Mac, here is how you can do it.

Solution 3 - Java

I noticed that in netbeans Apache configuration in the servers tab. you can state the platform for your web application. I changed to 1.8 and it worked fine. (I am targeting java 8 platform in my application). Hope that might t help.

Solution 4 - Java

I assumed openjdk8 would work with tomcat8 but I had to remove it and keep openjdk7 only, this fixed the issue in my case. I really don't know why or if there is something else I could have done.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3329290View Question on Stackoverflow
Solution 1 - JavaLeonard BrüningsView Answer on Stackoverflow
Solution 2 - JavaDenis KutlubaevView Answer on Stackoverflow
Solution 3 - JavaMTomView Answer on Stackoverflow
Solution 4 - JavajigzatView Answer on Stackoverflow