摘要:Maven
,IDEA
(1)Error:java: Compilation failed: internal java compiler error
-
Error:java: Compilation failed: internal java compiler error
参考https://blog.csdn.net/wo541075754/article/details/82119860
jdk
版本问题, 检查Project Structure
下Project
的Project SDK
和Project language level
,Modules
下Sources
下language level
,Settings
下Java Compiler
以及pom
是否一致
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
(2)新建一个java项目同时支持scala
Libraries
或者Global Libraries
下设置添加scala sdk
-
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Predef$
在pom.xml中添加
<!-- scala -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_2.11</artifactId>
<version>1.0.6</version>
</dependency>
在project settings中的SDKs中添加classpath,.m2/repository/org/scala-lang/scala-library/2.11.11/scala-library-2.11.11.jar
(3)maven窗口消失 只剩Ant
菜单栏Help->Find Action(Ctrl+Shift+A),输入Maven projects,点击 Add Maven Projects,或者打开pom.xml,右键Add Maven Projects
(4)打补丁patch
右键项目文件,subversion -> commit directory -> 点击commit的下箭头 -> create patch
网友评论