UnsupportedClassVersionError due to java 7?

So, I just finished the task for the university and wanted to check my solution on my server and got this exception:

  [java] Exception in thread "main" java.lang.UnsupportedClassVersionError: controller/CloudController : Unsupported major.minor version 52.0
     [java]     at java.lang.ClassLoader.defineClass1(Native Method)
     [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
     [java]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     [java]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
     [java]     at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
     [java]     at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
     [java] Java Result: 1

I checked the server and found out that they were using Java 7 while I was already using Java 8.

What I tried then was as follows:

enter image description here

I changed the Project language level to 7, but still this did not solve the problem.

So here is my question, do I really need to download 1.7 jdk to make this work, because I want to avoid it. The program should run on the server, though, since it is used for evaluation, and I obviously cannot update the version of Java on the university server.

Thanks for any answers in advance.

+4
1

, JDK 7. . IntelliJ IDEA 14, , , 13 12.

, ,Java. "" . 1.7, .

enter image description here

, - ( , ).

+8

Source: https://habr.com/ru/post/1569886/


All Articles