Reputation: 3
When I run my project I get the following errors. My jdk is currently 1.8. To fix it, I have tried resetting the jdk, downgrading to 1.7, I've checked my buildpaths, I've gone into preferences and restored to defaults and it's the same error. I've deleted and reinstalled the jdk as well.
In regards to the error about JavaLaunchHelper I found a question on here that said it's a bug that isn't fixed in 1.8 and that it can be ignored as they are actually in the right place.
My IDE is Spring Tool Suite and I'm writing in Spring Data.
Any help is appreciated, thanks!
objc[8419]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
java.lang.UnsupportedClassVersionError: io/pivotal/ticket/RuleControllerTest : 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 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:685)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Upvotes: 0
Views: 189
Reputation: 17525
The class io/pivotal/ticket/RuleControllerTest
has been compiled using Java 1.8, but you are trying to run it using Java 1.7 (or earlier). You should check your run config. Since this is being run from Eclipse's test runner, you need to either change the run config for that or run Eclipse using JDK 1.8.
Upvotes: 1