I see conflicting guidance on the recommended version of Java; some places say use version 8 while elsewhere it’s 8 or above. What is the correct version to use?
Hi @Mark_Cockfield ,
You can use Java 11 for your CloudCode code.
Java SDK is compiled for Java 7 but Java code of custom CloudCode services is executed using Java 11.
Regards, Andriy.
Hi Andriy, Thanks for the reply. Mark
I had jdk17 installed which I uninstalled and installed jdk11. I am using Visual Studio Code and
created a fresh project to eliminate any potential artifacts of jdk17. When I run CodeRunner I get this error:
java.lang.UnsupportedClassVersionError: com/backendless/coderunner/CodeRunnerLoader has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Is my assumption correct that this is in reference to the backendless.jar file?..and, I should go back to jdk17?
I am sorry. My mistake - we are currently moving to the Java 17 but I didn’t know that CodeRunner already requires it to run locally.
Yes, your assumption is correct - you should use JDK 17 locally.
Regards, Andriy
Hey Andriy,
Well that’s a relief. To further clarify, should I still build with jdk 11 for deployment?
Cheers, Mark
No, you can use JDK 17 for build since CodeRunner in Cloud platform uses Java 17
Regards, Andriy
Very good. Again, thanks for everything.