سؤال

I get the following exception when i launch my application through JWS.But it works completely fine when launched as a standalone java application without JNLP.

 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)

here is the 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 contains the main class file.All the JARS used are signed.

هل كانت مفيدة؟

المحلول

  1. Make sure the Jar that contains org.slf4j.LoggerFactory is referenced in the resources.
  2. The JNLP is invalid. Be sure to check (& correct) it using JaNeLA.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top