У меня проблема с моим очень простым проектом в Scala:
Error:scalac: Error: Could not initialize class com.sun.jna.platform.win32.WinBase$FILETIME
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.platform.win32.WinBase$FILETIME
at sbt.internal.io.WinMilli$.toNative(Milli.scala:310)
at sbt.internal.io.WinMilli$.toNative(Milli.scala:259)
at sbt.internal.io.MilliNative.setModifiedTime(Milli.scala:68)
at sbt.internal.io.Milli$.setModifiedTime(Milli.scala:354)
at sbt.io.IO$.setModifiedTimeOrFalse(IO.scala:1234)
at sbt.io.IO$.next$1(IO.scala:309)
at sbt.io.IO$.extract(IO.scala:317)
at sbt.io.IO$.$anonfun$unzipStream$1(IO.scala:281)
at sbt.io.Using.apply(Using.scala:22)
at sbt.io.IO$.unzipStream(IO.scala:281)
at sbt.io.IO$.$anonfun$unzip$1(IO.scala:264)
at sbt.io.Using.apply(Using.scala:22)
at sbt.io.IO$.unzip(IO.scala:264)
at sbt.internal.inc.AnalyzingCompiler$.$anonfun$compileSources$3(AnalyzingCompiler.scala:338)
at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
at scala.collection.immutable.List.foldLeft(List.scala:89)
at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:154)
at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:154)
at scala.collection.AbstractTraversable.$div$colon(Traversable.scala:108)
at sbt.internal.inc.AnalyzingCompiler$.$anonfun$compileSources$2(AnalyzingCompiler.scala:337)
at sbt.internal.inc.AnalyzingCompiler$.$anonfun$compileSources$2$adapted(AnalyzingCompiler.scala:335)
at sbt.io.IO$.withTemporaryDirectory(IO.scala:376)
at sbt.io.IO$.withTemporaryDirectory(IO.scala:383)
at sbt.internal.inc.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:335)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$.org$jetbrains$jps$incremental$scala$local$CompilerFactoryImpl$$getOrCompileInterfaceJar(CompilerFactoryImpl.scala:123)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.$anonfun$getScalac$1(CompilerFactoryImpl.scala:55)
at scala.Option.map(Option.scala:163)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.getScalac(CompilerFactoryImpl.scala:47)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:25)
at org.jetbrains.jps.incremental.scala.local.CachingFactory.$anonfun$createCompiler$3(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.Cache.$anonfun$getOrUpdate$2(Cache.scala:20)
at scala.Option.getOrElse(Option.scala:138)
at org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)
at org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:34)
at org.jetbrains.jps.incremental.scala.remote.Main$.compileLogic(Main.scala:117)
at org.jetbrains.jps.incremental.scala.remote.Main$.handleCommand(Main.scala:109)
at org.jetbrains.jps.incremental.scala.remote.Main$.serverLogic(Main.scala:95)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:53)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
Здесь вы можете найти код:
object Task1 {
def main(args: Array[String]) {
val dayOfWeeks = List("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
for (e <- dayOfWeeks) println(e + ";")
}
}
У вас есть идеи? Я попытался удалить плагин и пересобрать проект, но ничего. Я установил свойство плагина и попробую с первым проектом в Scala, но я столкнулся с этим кодом ошибки.