来自Scala下的repo的jMonkeyEngine正在崩溃

时间:2017-06-10 14:07:29

标签: scala sbt jmonkeyengine

经过很长一段时间后,我再次尝试使用Scala进行jMonkeyEngine。这次我想要正确设置sbt和依赖项。不幸的是,存在很多问题和不适(比如必须手动编写jME包含的疯狂数量的包,没有模板或其他东西;或者jBullet部分被破坏)。我在编译时以某种方式解决了依赖问题,但是当我运行hello world app(从第一个教程开始)时,我得到了:

Exception in thread "main" java.lang.SecurityException: sealing violation: package org.lwjgl.opengl is sealed

我正在谷歌上搜索这个异常,似乎有些版本的库被打破了。但我唯一的依赖是jME的所有相同版本的部分,所以它是否意味着他们(jME家伙)破坏它?

build.sbt的相关部分:

// resolvers += Resolver.sonatypeRepo("snapshots")

resolvers += Resolver.jcenterRepo

resolvers += Resolver.bintrayRepo("jmonkeyengine", "org.jmonkeyengine")

val jmeVersion = "3.1.0-stable"

libraryDependencies += "org.jmonkeyengine" % "jme3-android-native" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-android" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-core" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-desktop" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-effects" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-jogg" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-jogl" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-lwjgl" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-lwjgl3" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-networking" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-niftygui" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-plugins" % jmeVersion

libraryDependencies += "org.jmonkeyengine" % "jme3-terrain" % jmeVersion

//libraryDependencies += "org.jmonkeyengine" % "jme3-jbullet" % jmeVersion //  not working, added it to lib dir...

任何想法如何解决这个问题(不下载jar并将它们放到lib目录中)?

1 个答案:

答案 0 :(得分:0)

这意味着包“org.lwjgl.opengl”是sealed并且您尝试加载包含相同包的另一个jar,您应该使用“jme3-lwjgl”或“jme3-lwjgl3”但不能两者同时进行。