Sunday, 18 September 2016

Java Stacktrace error 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 java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"



What does it mean? This is my code...



package net.glitching;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.net.Socket;


public class client {

static Socket sock = null;

public static void main(String[] args) {
while (true) {
try {
sock = new Socket("localhost", 4000);
ObjectInputStream in = new ObjectInputStream(sock.getInputStream());
}

catch (IOException ex) {}
}
}

}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...