Unsupported major.minor version 52.0 [duplicate]

This question already has answers here: How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version (50 answers) Closed 5 years ago. 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) { page.drawString (“Hello World!”, 50, … Read more

Unsupported major.minor version 52.0 [duplicate]

The issue is because of Java version mismatch. Referring to the JVM specification the following are the major versions of classfiles for use with different versions of Java. (As of now, all versions support all previous versions.) Java SE version Major version 1.0.2 45 1.1 45 (Not a typo, same version) 1.2 46 1.3 47 1.4 48 … Read more

JOptionPane YES NO OPTION

You should actually take the result from the option pane: dialogButton = JOptionPane.showConfirmDialog (null, “Are you sure?”,”WARNING”, dialogButton); Otherwise, it remains set to JOptionPane.YES_NO_OPTION. Cleaner would be: if (JOptionPane.showConfirmDialog(null, “Are you sure?”, “WARNING”, JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { // yes option } else { // no option } Although, I’m not sure what this line is … Read more

Java Embedding Into HTML

I’m sure this question has been asked a million times, but no matter how many Google searches I do I cannot get this working. I’m basically trying to get a project with multiple packages in it to be embedded in a webpage. I made a test program which just made some balls bounce around the … Read more

.class vs .java

A .class file is a compiled .java file. .java is all text and is human readable..class is binary (usually). You compile a java file into a class file by going to the command line, navigating to the .java file, and running javac “c:\the\path\to\your\file\yourFileName.java” You must have a java SDK installed on your computer (get it … Read more