且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么在尝试运行此代码时出现java.lang.NoClassDefFoundError?

更新时间:2023-11-19 21:50:28

我认为您的问题是scala库不在您的运行时类路径中。您必须手动手动添加。

I think that your problem is that scala library is not in your runtime classpath. you must manually add manually.

如果您使用的是maven或sbt之类的工具,则依赖项可能会标记为已提供,而不是已编译。

If you are using tools like maven or sbt, maybe the dependency is marked as provided instead compiled.

如果不使用这些工具,请将 scala-library.jar添加到库目录中

If you are not using these tools, add "scala-library.jar" to your library directory