摘要: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











网友评论