Hi, We've have an application that has an applet to print label and barcodes to a Smart Lable Printer model 100. It works fine in I.E. when running under SUN's JDK and modifying the policy.java security file to grant permission to the application http//server. It also runs under the MS JVM in I.E. whem modifying the advance setting and using custom options. The problem is that the users desktops a locked down (crippled) so that custom setting can not be used and SUN's JDK can not be used. To try and get around this I created an applet .cab file and signed it with Authenticode and changed the applet code as follows;
Original code(works fine when modifying policy.java) APPLET_BEGIN_TAG = "<applet CODE=\"com/wfsc/rush/barcode/SLPApplet.class\" CODEBASE=\"../../\" ARCHIVE=\"slp_applet.jar\" HEIGHT=\"0\" WIDTH=\"0\">";
When the applet is called, the Authenticode dialog box appears as would be expected and after clicking RUN the applet does not load. The java console reports the following;
Microsoft (R) VM for Java, 5.0 Release 126.96.36.19910 ============================================== ? help c clear f run finalizers g garbage collect m memory usage q quit t thread list ============================================== java.lang.ClassNotFoundException: com.wfsc.rush.barcode.SLPApplet at com/ms/vm/loader/URLClassLoader.loadClass at com/ms/vm/loader/URLClassLoader.loadClass at com/ms/applet/AppletPanel.securedClassLoad at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.processSentEvent at com/ms/applet/AppletPanel.run at java/lang/Thread.run
The SLPApplet class file and slp_applet.cab file are in the correct locations. What could be causing the applet not to be found?
Actually, I'm testing this locally on my pc as a local host using Tomcat and I can manually see and access all the files.
Joined: Mar 22, 2005
By "download" I meant download over HTTP, which is what the applet would be doing. I've never used the cabbase attribute, so I don't know how it interacts with the codebase attribute. You can take a look at the Tomcat logs to see whether it gets downloaded, and from which location the JVM actually tries to download it.