IntelliJ Idea编译报错:
- Information:Using javac 1.7.0_79 to compile java sources
- Information:java: javacTask: 源发行版 1.7 需要目标发行版 1.7
- Information:java: Errors occurred while compiling module 'xxx'
- Information:15/8/14 下午11:08 - Compilation completed with 1 error and 0 warnings in 1s 913ms
- Error:java: Compilation failed: internal java compiler error
参考了附录中的文章,作如下修改(Idea版本14.1.4):
File-->Other Settings-->Default Settings-->Compiler-->Java Compiler
在Per-module bytecode version下点击“+”,出现的Choose Module框中是空白,无法修改Target bytecode version.
选择项目,右击选择“Open Project Settings”-->Modules-->Language Level,改成6、7、Project Default都不起作用,折腾半天。

在Stackoverflow上偶然搜索到如下说明(http://stackoverflow.com/questions/12900373/idea-javac-source-release-1-7-requires-target-release-1-7):
- I've hit this after just minor upgrade from IntelliJ IDEA 14 to v14.1. For me changing an edit of top/parent pom helped and then clicked re-import Maven (if it is not automatic).
-
- But it maybe just enough to Right Click on module(s)/aggregated/parent module and Maven -> Reimport.
选中项目,右击选择Maven-->Reimport, 再次编译,问题解决。
-------------------------附录------------------------
http://loftor.com/archives/idea-javacTask.html
在idea中编译时发生如下的错误
Information:Using javac 1.7.0_75 to compile java sources
Information:java: javacTask:源发行版1.6需要目标发行版1.6Information:java:Errors occurred while compiling module'kulong'Information:15/3/2613:22-Compilation completed with1 error and0 warnings in5s771msError:java:Compilation failed:internal java compiler error
解决办法
setting->Compiler->Java Compiler 设置相应Module的target byte code version的合适版本就行来。

分享到:
相关推荐
在使用IntelliJ IDEA开发Java项目时,可能会遇到一个令人头疼的错误:“Error:java: Compilation failed: internal java compiler error”。这个错误通常意味着IDE在尝试编译代码时遇到了内部问题,可能是由于配置不...
【标题】:“idea: 不支持发行版本 5 11 12 13 compilation failed: internal java compiler error” 在编程开发过程中,我们经常会遇到IDE(集成开发环境)与Java编译器之间的兼容性问题。这里的问题是 IntelliJ ...
method within complex expressions could cause an internal compiler error. AcpiExec: Implemented full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ----...
26)..Fixed: Rare EurekaLog internal error 27)..Fixed: Ignored unhandled thread exceptions (when EurekaLog is disabled) now triggers default OS processing (WER) 28)..Fixed: Irnored exceptions (via per-...
- Added Bochs compilation timestamp after Bochs version string. - GUI and display libraries (Volker) - Added new .bochsrc option to select mouse capture toggle method. In addition to the default ...
You can declare functions in a way that allows the compiler to expand them inline rather than calling them through the usual function call mechanism. Pros: Inlining a function can generate more ...