Reputation: 11
I'm trying to compile my project based on Maven in GCP Console and I simply typed the command for compile.
[ERROR] /home/dragon2/Dialogflow-NLUtest/src/main/java/com/example/dialogflow/SpeechToTextInDialogflow.java:[12,15] cannot access java.io.File
[ERROR] bad class file: /modules/java.base/java/io/File.class
[ERROR] class file has wrong version 55.0, should be 53.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
I know that there is a compile java version 55.0 is built with a running environment 53.0.
but I don't know how to fix it...
Could anyone please help someone who knows??
Upvotes: 0
Views: 6588
Reputation: 111
It means that the java runtime version is 11, but your compiler version is 9. To solve it, simply downgrade the Java version from 11 to 9.
To keep using your current runtime, change the JAVA_HOME to your most recent JDK.
Upvotes: 1