0
Java 11.0.2: 'UnsupportedClassVersionError
Today I installed Java on my PC, wrote, compiled and ran my little 'Hello World' - everything worked just fine. Later that day I wrote another code and tried again. Funny thing: When I wanted to start the program, it compiled, but when I wanted to run it, I was told it was compiled by a newer compiler and my interpreter can't deal with it. It was the same single install package from earlier that day. Anyone any idea what's going on?
2 Answers
+ 1
Hope the discussion here could help you : https://stackoverflow.com/questions/10382929/how-to-fix-java-lang-unsupportedclassversionerror-unsupported-major-minor-versi. Maybe the different versions of JDK and JRE ( between the old and new compiler provoke the problem).
+ 1
It looks like it matches my problem.
According to this, I compile with Java 11 and run with Java 8 - although I downloaded it all in one package today.
Maybe I have some remnants of older Java versions lurking and interfering? I set the PATH and all but who knows... it's all still a mystery to me. đđ€đ