1

enter image description here

I am using Codeanywhere and I need to run a web server with maven. But it gives me this error: Fatal error compiling: invalid target release: 12 -> [Help 1], as also seen in the image but I don't understand how to fix it.

1 Answers1

1

Maven is trying to compile using Java 12, but it cannot be found. Either set the path correctly to your JDK 12 or set the target JDK in pom.xml to something else (the easiest way is to set the maven.compiler.target property). See similar answers

pxcv7r
  • 478
  • 5
  • 14
  • so i have to change 12 ? i don't know how to change it. I used netbeans to write the code and the default version used is JDK 12 so I don't know what to change and how to put the path – Nome Cognome Jan 04 '21 at 16:11
  • No, change it to a version that is actually installed on your system. Try opening a command line and type `java -version`. Note that 12 is an outdated non-LTS version that is not supported by most JDK vendors. – pxcv7r Jan 04 '21 at 16:21
  • Happy to hear! You also may accept the answer if it did answer your question. – pxcv7r Jan 04 '21 at 16:39