4 Replies Latest reply on Apr 1, 2010 7:25 PM by 843798

    Refelction with JNLP launched app

      This code runs fine when running in Eclipse, or double clicking the jar file. However when I launch using jnlp, I get an error.
                String cname = "dbObjects.DBO_"+sel;
                ClassLoader cl = ClassLoader.getSystemClassLoader(); 
                try {
                     Class myClass = Class.forName( cname, false, cl ); //cl.loadClass(cname);
                     Object obj = myClass.newInstance(); 
      java.lang.ClassNotFoundException: dbObjects.DBO_ZipCodes
           at java.net.URLClassLoader$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(Unknown Source)
           at java.lang.ClassLoader.loadClass(Unknown Source)
           at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
           at java.lang.ClassLoader.loadClass(Unknown Source)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Unknown Source)
           at GUI.PnlAdmin.onSelChange(PnlAdmin.java:114)
      <?xml version="1.0" encoding="utf-8"?>
      <!-- JNLP File for Tmgr Download -->
      <jnlp spec="1.0+" codebase="http://www.earthbest.com" href="tmgr.jnlp">
             <vendor>Simple Software</vendor>
             <description kind="short">tmgr Download</description>
             <icon href="TMgr.png" />
             <icon kind="splash" href="TMgr.png" />
             <shortcut online="false">
                  <desktop />
             <j2se version="1.6.0_10+" href="http://java.sun.com/products/autodl/j2se" />
             <jar href="tmgr.jar"/>
           <application-desc main-class="TMgr">
              <!-- <argument>...</argument> -->
      I checked the jar file and the class files are there.