-1

I'm trying to run a java application that I have compiled using the IntelliJ IDEA, by the commandline running the following command: java myApp.Main

This gives me the following error: "Exception in thread "main" java.lang.UnsupportedClassVersionError: FlightConverter/Main 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"

In IntelliJ the JRE set to run in the run configuration is: /Java/jdk-11.0.3, but I get the error above when I try to run it. When i type java -version in cmd I get "1.8.0_211"

I cant really seem to find out how to update my current JRE to match what is used by the compiler either? It seems I'm only able to find JRE 8.xx online

robinmanz
  • 225
  • 2
  • 11
  • 3
    From Java 11 onwards, Oracle only ships JDK distributions. That's OK. Just install and use a JDK. – Stephen C Jul 22 '19 at 11:45
  • AdoptOpenJDK still makes JRE available https://adoptopenjdk.net/archive.html?variant=openjdk11&jvmVariant=hotspot – Thilo Jul 22 '19 at 11:47

1 Answers1

0

I'm sure you can get location of java 8 from local system and set that as a compiler in IntellIJ IDE.. This way both your system and IDE works only on Java 8 and everything will work fine...

Hope this helps...