0

Sorry for being a bother, but ever since yesterday, I've had issues with IntelliJ not working. Every time I try to run maven build, it always says the same error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project HelloWorld: Fatal error compiling: error: invalid target release: \1.8 -> [Help 1]

I tried searching up similar questions on here, such as this one, but the issue for that OP is his IntelliJ is outdated. For reference, I'm using IntelliJ 2019. Furthermore, everything was working last week and the week before, I have no idea what might've caused IntelliJ to suddenly throw me that error.

I've also tried following the steps taken by the OP and the answer here, to no avail. I set the Java compiler option to both 1.8 and 12, to no avail, and went to maven runner to set the JRE to JDK 12, without working.

At this point, I am truly frustrated with IntelliJ and can't tell if I'm being dumb. Anything would be helpful.

Here are my "settings" enter image description here

Note for both bytecode versions, I have experimented with 12 and 1.8. Both produce the same output.

enter image description here enter image description here

Frank W
  • 81
  • 8
  • `\1.8` looks suspicious. Did you specify the option with the slash somewhere in `pom.xml` or in the IDE? https://stackoverflow.com/a/12900859/104891 – CrazyCoder Jun 07 '19 at 05:59
  • @CrazyCoder I doubt it, pom.xml gives this for 1.8: 1.8. Can you elaborate on your second question, the \1.8 in the IDE? – Frank W Jun 07 '19 at 06:01

1 Answers1

2

You have a typo in the options:

typo

Must be 1.8 instead of \1.8.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • I'm still having the issue. I removed the forward slash and ran maven build. Still brought up the same error on invalid target release... – Frank W Jun 07 '19 at 06:05
  • Check your pom.xml for the same typo. – CrazyCoder Jun 07 '19 at 06:05
  • 1
    Well, it worked now. Turns out I had to remove the slashes in the code ${java.version} and ${java.version}. Is there any reason why IntelliJ might've added the slashes? It was working a week ago, I am baffled – Frank W Jun 07 '19 at 06:08