idea忽略java错误,IDEA设置Eclipse编译(用于忽略有编译错误的Class)

Why you should use the Eclipse compiler in Intellij IDEA

If you use Intellij, you should consider using the Eclipse compiler instead of Javac.

The compiler used for your project can be changed in the IDE settings page.

0818b9ca8b590ca3270a3433284dd417.png

Note that if you are using Java 8, then only Intellij 14 and higher have options to select the Eclipse compiler.

Unlike Javac, the Eclipse compiler is designed to be used first and foremost inside an IDE and thus offers some features that make it ideal for development usage:

1. Proceed on errors

It is entirely possible that some portion of your source code may contain some compile time errors, however you want to quickly try executing some small test to check if some other part of your code works properly or not.

With the Javac compiler, you won’t have a choice but to fix all those errors before you are allowed to execute anything. The Eclipse compiler however will allow you to execute code regardless. Its aim is to always produce a runnable binary. If your code does hit a line with compile time error in it, it will throw a runtime exception instead.

To enable this feature, you will need to:

Check ’Proceed on errors’ in the Compiler settings page.

0818b9ca8b590ca3270a3433284dd417.png

Replace the ’Make’ build step of your Run Configuration with ’Make, no error check’.

0818b9ca8b590ca3270a3433284dd417.png

2. Incremental Compilation

The Eclipse compiler is designed to run in the background of an IDE and thus natively supports incremental compilation. What this means is that it can compile only the changed blocks of code since the last compile, resulting in very fast build times.

3. Parallel compilation

Unlike Javac, the Eclipse compiler can use multiple cores to speed up compilation, finally putting all those extra cores in your PC to good use.

Conclusion

As can be seen, there is no good reason to continue using Javac inside an IDE. Hopefully Jetbrains will make it the default compiler in future versions of Intellij IDEA.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值