1 year ago
#277530
tn09
Java 8 project but swt needs Java 11
I have a little problem with SWT inside my project. I have written a tool with a SWT GUI but it only runs with a Java version 11 or higher. But now it is necessary for the moment that the tool is also executable under Java 8. So I installed a Java 8 version and changed the JRE in the project settings of my tool and SWT to V8 and under Java compiler I changed the version to 1.8. Now unfortunately this error occurs, does anyone of you have an idea what I can do?
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/swt/widgets/Decorations has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at mergeDataDelivery.Main.main(Main.java:21)
I thought that I would have to search for a matching SWT version to Java 8, but unfortunately my search has been unsuccessful so far.
java
swt
0 Answers
Your Answer