英文:
When building Scala(2.7.0) maven project getting error "error while loading Consumer" with Java 8 in IntelliJ
问题
在构建Scala的Maven项目时出现错误:
错误信息:
error while loading Consumer, class file 'C:\jdk1.8.0_181\jre\lib\rt.jar(java/util/function/Consumer.class)' is broken
英文:
When building Scala maven project getting error:
error while loading Consumer, class file 'C:\jdk1.8.0_181\jre\lib\rt.jar(java/util/function/Consumer.class)' is broken
答案1
得分: 1
在搜索后找到了这个链接(https://github.com/jboner/akka-training/issues/1),其中指出:
有两种解决方法:
选项1:使用Java 7与Scala 2.7.2
选项2:使用另一个版本的Scala(2.11.4)和Java 8:
我尝试了选项2并升级了Scala版本到2.12.0,这对我起作用。
英文:
After searching find out this link(https://github.com/jboner/akka-training/issues/1) which states:
There are two ways to solve it:
Option 1: Using java 7 with scala 2.7.2
Option 2: Using another version of scala (2.11.4), and java 8:
I tried option-2 and upgraded Scala version to 2.12.0, it worked for me.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论