Minecraft 1.12, server does not start. "Linux external server" [duplicate] - java

This question already has answers here:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
(51 answers)
Closed 5 years ago.
I have a minecraft server running on a linux server i have at home, the server has been running fine in "snapshot 17w06a" for months without any issue. But now i want to update it to the "Minecraft 1.12-pre-release". I can easily set the server up locally on my PC, but when i try to run it on the server, it fails and gives the message below.
I have literally tried everything but it does not seem to work, i have even tried to copy the exact same folder that worked local on this PC onto the server. But it just won't start.
jens#clipster:~/Mc$ java -Xms1024M -Xmx2048M -jar minecraft_server.1.12.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/MinecraftServer : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
jens#clipster:~/Mc$
I would really appreciate any help i can get, than

If you look at Java docs of UnsupportedClassVersionError class it says:
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.
So JVM on your linux server doesn't support the version of JDK used to compile the new code. Version 52, implies your new code was compiler using JDK 1.8 and my guess is your Linux server runs any older Java version and hence this error.

Related

Unsupported major.minor version 52.0 NetBeans Apache 12.2

in my school they asked me to make an application with JavaFXML, but I am having many problems with the IDE that I use, which is NetBeans Apache 12.2, because I have JDK 15 installed and it seems that since JDK 1.8 JavaFx does not come by default Anyway, I had to download JDK 1.7.8 so that it would allow me to make an application with JavaFX to do step by step as much as possible what my teacher does (If it were up to me, I would use any Java application and import the libraries) , but at the time of compiling the program it seems that it is compiling with JDK 15 or 1.8, I don't know, but the point is that I get an error for having compiled with a larger JDK. And I do not know how to configure NetBeans so that that does not happen, I hope you can guide me.
ant -f "C:\\Users\\home\\OneDrive\\Escritorio\\Laboratorio de ProgramaciĆ³n Orientada a Objetos\\JavaFXApplication2" jfxsa-run
jfxsa-run:
java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main"
Result: 1
BUILD SUCCESSFUL (total time: 1 second)
Version 52.0 means Java 1.8 and the error message means that you are compiling your java code with a Java 1.8 compiler but you are running it with a Java version that is less than 1.8. I guess, from your question, that you are running with 1.7.
I suggest that you remove all your JDK installations and simply install JDK 1.8. You can download it from here...
https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
JDK 1.8 includes JavaFX.
If you prefer to use JDK 15, then you can download JavaFX 15 from here...
https://gluonhq.com/products/javafx/
The following link explains the java class file versions.
https://en.wikipedia.org/wiki/Java_class_file

zookeeper: Unsupported major.minor version 52.0

I'm trying to follow the guide on the kafka website:
https://kafka.apache.org/quickstart
But when I use kafka_2.12-2.5.0 and try to start the zookeeper I get:
$ bin/zookeeper-server-start.sh config/zookeeper.properties
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/zookeeper/server/quorum/QuorumPeerMain : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
I'm using redhat7.1.
Tried to update java:
$ sudo yum install java-1.8.0-openjdk-devel
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
...
Package 1:java-1.8.0-openjdk-devel-1.8.0.31-2.b13.el7.x86_64 already installed and latest version
Nothing to do
What version of Java should I have?
This '52.0' means that it's compiled with 1.8 jdk, but you are triying to run mainly with lower one (or even very high incompatible?).
By default use the JAVA_HOME environment variable, so hope you already checked the basics: java_home, java --version... or even force an export of java_home just before running pointing a proper 32/64 java

Unsupported major.minor version despite using correct Java version

I'm running a script that uses Eclipse and I am seeing this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: my/file/path/goes/here/CreateEcoreFile : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Some googling led me to believe that I was perhaps trying to compile a Java 7 project with a Java 8 compiler. I have checked my system (Cent OS 6) and I only have Java 7 installed, I even downgraded my Eclipse to Neon 1.A and it's build path is Java 7.
$ java -version
java version "1.7.0_51"
What else can I do?
As per this answer version 52.0 means Java 8. Eclipse uses it's own ECJ compiler which is part of the IDE, which probably uses Java 8 as default.
Follow this guide and set the Java compiler version for your project to Java 7:
Go to Window -> Preferences
Go to Java -> Compiler
Select Compiler compliance level

Eclipse latest chrome version not supported in linex

I am run in eclipse getting below error
Please Any one tell me the solution
java.lang.UnsupportedClassVersionError: org/openqa/selenium/WebDriver : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
at java.lang.Class.privateGetPublicMethods(Class.java:2743)
at java.lang.Class.getMethods(Class.java:1480)
at org.testng.internal.TestNGClassFinder.(TestNGClassFinder.java:70)
at org.testng.internal.TestNGClassFinder.(TestNGClassFinder.java:40)
at org.testng.TestRunner.initMethods(TestRunner.java:400)
at org.testng.TestRunner.init(TestRunner.java:252)
at org.testng.TestRunner.init(TestRunner.java:222)
at org.testng.TestRunner.(TestRunner.java:171)
at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:28)
at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:61)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:604)
at org.testng.SuiteRunner.init(SuiteRunner.java:170)
at org.testng.SuiteRunner.(SuiteRunner.java:117)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1359)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1346)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1200)
at org.testng.TestNG.runSuites(TestNG.java:1124)
at org.testng.TestNG.run(TestNG.java:1096)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
The problem is that your Java installation is out of date.
The version number (52) is Java 8, so if you are getting an exception that says 52 is not understood, then you must be running those tests using a JVM that is Java 7 or earlier. Code that is compiled for that Java 8 platform will not run on a Java 7 (or earlier) JVM.
Java 7 is out of date, and well beyond the official "end-of-life" (April 2015) .... and you should upgrade.
If you insist on using an out-of-date Java platform for your development, then you are going to need to download the source code for the selenium libraries, and recompile them using a Java 7 compiler. (And, if selenium is starting to use Java 8 features, you will need to roll back to an earlier selenium release ... or backport.)

Unsupported major.minor version 52.0 - edu/stanford/nlp/classify/ColumnDataClassifier [duplicate]

This question already has answers here:
Unsupported major.minor version 52.0 [duplicate]
(26 answers)
Closed 7 years ago.
I am using stanford-classifier-3.5.1 jar on my system and trying to run the example classifier only. I am getting the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/stanford/nlp/classify/ColumnDataClassifier : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at ClassifierDemoStanford.main(ClassifierDemoStanford.java:20)
I have tried with Java version 1.6, 1.7 both. The readme file says This software requires Java 5 (JDK 1.6.0+).
Please help.
The error message means that the code requires Java 8. I checked out the website and the latest release supports Java 8, since October 2014.
I would estimate that the readme file is out of date.
If you use Java 8 it will run this fine.
If you can't upgrade to Java 8, you might downgrade the version of the classifier jar file to the version before Java 8 was added - version 3.4.1
http://nlp.stanford.edu/software/classifier.shtml

Categories