代码:
import com.google.common.base.Joiner
import scala.collection.JavaConverters._
object MainJ extends App {
val fantasyGeneres = Array("Space Opera", "Horror", "Magic realism", "Religion")
val joined = Joiner.on(',').join(fantasyGeneres.toIterable.asJava)
println(joined)
}
IntelliJ IDEA错误:
scala: error while loading Joiner, class file 'C:\guava- 15.0.jar(com/google/common/base/Joiner.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 9 at byte 10)
Scala插件版本:
Scala -> 0.26.318
Version: 0.26.318
Date: 2013-12-04 10:46
Since: 133.124
Until: 134.0
Size: 25346.32 Kb
Eclipse错误:
Description Resource Path Location Type
error while loading Joiner, class file 'C:\guava-15.0.jar(com/google/common/base/Joiner.class)' is broken (class java.lang.RuntimeException/bad constant pool tag 9 at byte 10) Scala Unknown Scala Problem
请看上面的图片,我用Guava库和scala语言编写了一个程序
WHEN 我使用带有Scala插件的 Eclipse IDE&带有Scala插件的IntelliJ IDEA 上面的错误显示,我无法编译它
任何人都可以帮助我吗?