当我通过JWS启动我的应用程序时,我得到以下异常。但是当它作为没有JNLP的独立Java应用程序启动时它完全正常。
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.xuggle.ferry.JNIMemoryManager.<init>(JNIMemoryManager.java:861)
at com.xuggle.ferry.JNIMemoryManager.<clinit>(JNIMemoryManager.java:860)
at com.xuggle.mediatool.MediaWriter.<clinit>(MediaWriter.java:119)
at com.xuggle.mediatool.ToolFactory.makeWriter(ToolFactory.java:149)
这是JNLP:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost/MyApp" href="MyAppLauncher.jnlp">
<information>
<title>MyAPP</title>
<vendor>Me</vendor>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="MyAppJar.jar"
main="true" />
<jar href="xuggle-xuggler.jar" />
<jar href="xuggle-xuggler-test.jar" />
<jar href="slf4j-api-1.6.6.jar" />
</resources>
<application-desc
name="MyApplication"
main-class=
"ApplicationMain"
width="300"
height="300">
</application-desc>
<security>
<all-permissions/>
</security>
<offline-allowed />
<update check="background"/>
</jnlp>
MyApp.jar包含主类文件。所有使用的JARS都已签名。