title: Swing application failed to start in Java 8 via calling it through JNLP
body: <p>I'm migrating a Swing Application from Java 6 to 8. Build and compilation is done successfully but when I deploy it over the WebLogic server and launch the application, I get the error below:</p>
  <pre><code>java.lang.NoClassDefFoundError: org/jvnet/substance/SubstanceLookAndFeel
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
      at java.lang.Class.getMethod0(Class.java:3018)
      at java.lang.Class.getMethod(Class.java:1784)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: java.lang.ClassNotFoundException: org.jvnet.substance.SubstanceLookAndFeel
      at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
      at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 8 more
  </code></pre>
  <p><a href="https://i.stack.imgur.com/IsHQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IsHQw.png" alt="getting error when launch the application" /></a></p>
  <p>Here is the JNLP file configuration.</p>
  <pre class="lang-XML prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;jnlp       spec=&quot;1.6+&quot;     codebase=&quot;http://SERVER_NAME:8080/jnlp/&quot; href=&quot;test.jnlp&quot;&gt;
      &lt;information&gt;
          &lt;title&gt;Test&lt;/title&gt;
          &lt;vendor&gt;ABC&lt;/vendor&gt;
          &lt;offline-allowed/&gt;
      &lt;/information&gt;
      &lt;security&gt;
          &lt;all-permissions/&gt;
      &lt;/security&gt;
      &lt;update check=&quot;always&quot; policy=&quot;always&quot; /&gt;
      &lt;resources&gt;
          &lt;j2se version=&quot;1.6+&quot; max-heap-size=&quot;512M&quot; initial-heap-size=&quot;256m&quot; href=&quot;http://java.sun.com/products/autodl/j2se&quot; /&gt;
          &lt;property name=&quot;weblogic.MaxMessageSize&quot; value=&quot;2000000000&quot;/&gt;
          &lt;!-- Environment --&gt;
          &lt;property name=&quot;env&quot; value=&quot;test&quot;/&gt;
          &lt;!-- SSO authentication parameters for DEBUGGING --&gt;
          &lt;property name=&quot;abc.xyx.debug&quot; value=&quot;true&quot;/&gt;
          &lt;property name=&quot;aaaa.rrrr.debug&quot; value=&quot;true&quot;/&gt;
          &lt;property name=&quot;tttt.rrrr.eee.enable&quot; value=&quot;true&quot;/&gt;
          &lt;jar href=&quot;libs/test-SNAPSHOT.jar&quot; main=&quot;true&quot;/&gt;
          ..........SOME OTHER JAR's
          &lt;jar href=&quot;libs/swingx-0.9.5.jar&quot;/&gt;
          &lt;jar href=&quot;libs/swing-worker-1.1.jar&quot;/&gt;
          &lt;jar href=&quot;libs/substance-lite-4.3.jar&quot;/&gt;
         
      &lt;/resources&gt;
      &lt;resources os=&quot;Windows&quot; arch=&quot;x86&quot;&gt;
          &lt;nativelib href=&quot;libs/XYZ-1.0.jar&quot;/&gt;
      &lt;/resources&gt;
      &lt;application-desc main-class=&quot;com.example.Login&quot; /&gt;
  &lt;/jnlp&gt;
  </code></pre>
  <p>Does anyone have an idea what could be the root cause of this issue, why it's throwing <code>NoClassDefFoundEroor</code>?</p>
  <p>P.S. Same build is working fine with Java 6 and it is also working with Java 8 when I execute the application from Eclipse (Run as Java Application).</p>