Java: see compile errors throughout project on save?

I've tried to switch from Eclipse to IntelliJ for my Java development. The one issue I have is that I want to quickly see any compile errors throughout my project when I make changes in a given file. E.g. if I remove a method, I want to see all of the resulting compile errors in any file in my project.

How can I do this in IntelliJ?

Thanks.

5 comments

Hello.

Please make Settings / Compiler / Make project automatically = Yes. Then see Problems tool window.

You may also make Settings / Compiler / Java Compiler / Use compiler = Eclipse. Default javac may, in general, work in some different way to Eclipse compiler.

Regards,
Alexander.

0

Thanks, Alexander.

When I try this with a Java 8 project I see:

"Error:java: source level should be comprised in between '1.3' and '1.7' (or '5', '5.0', ..., '7' or '7.0'): 8"

Is there a way to use the Eclipse compiler with a Java 8 project in Idea 13.1 (what I'm using) or Idea 14?

Thanks.

0

Hi.

Can't reproduce the problem. I've created new single module project, set java 8 everywhere, Compiler = Eclipse, provided dummy code with a lambda, and it's compiled fine.

I'm out of office right now, will check the code tomorrow to find the condition when your error is shown.

For now, you can check the following places to verify that the configuration is Ok:
- Project Structure dialog / Project page: check SDK and language level.
- Project Structure dialog / Modules / a module: Source / language level and Dependencies / Module SDK.
- Settings dialog / Compiler / Java Compiler: any settings related to java version, there are a few.

Regards,
Alexander.

0

Looks like this message comes from the compiler itself, but I can't reproduce the issue. Please check the list in my previous comment.

Regards,
Alexander.

0

Thanks, Alexander! I believe my problem was caused by accidentally compiling using an early access-release version of 1.8. With the latest 1.8, I can't reproduce the issue.

0

Please sign in to leave a comment.