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

2
  • \1.8 looks suspicious. Did you specify the option with the slash somewhere in pom.xml or in the IDE? stackoverflow.com/a/12900859/104891 Commented Jun 7, 2019 at 5:59
  • @CrazyCoder I doubt it, pom.xml gives this for 1.8: <java.version>1.8</java.version>. Can you elaborate on your second question, the \1.8 in the IDE? Commented Jun 7, 2019 at 6:01

1 Answer 1

2

You have a typo in the options:

typo

Must be 1.8 instead of \1.8.

Sign up to request clarification or add additional context in comments.

3 Comments

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...
Check your pom.xml for the same typo.
Well, it worked now. Turns out I had to remove the slashes in the code <source>${java.version}</source> and <target>${java.version}</target>. Is there any reason why IntelliJ might've added the slashes? It was working a week ago, I am baffled

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.