[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 941
  • Last Modified:

Download JAR applet

Hi,

I have created a simple applet - 3 class file as long as an html to invoke it, which seems to work fine. I am now working on the download part, I was able to download the 3 class file and 1 html locally and run from there successfully, but I hope to JAR 3 class file and distribute the JAR along with the HTML. However I had problem after I downloaded the JAR and HTML, "ERror notinit applet". I did some research and found out the JAR has to be signed in order for somebody to use it. Do I have to do it?

I donot want to use ZIP to distribute it since it will require user has WINZIP installed.

Thanks
Pat
0
pwang1973
Asked:
pwang1973
  • 3
1 Solution
 
COBOLdinosaurCommented:
The signing requirment is necessary to protect users and the networks users are on.  If you are not prepared to work within normal security requirments, then don't development componnents that hae a potential to deliver malicious content.

If you want to do thing right this page fromt eh sin site should help work through the security issues:

http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/development.html

Cd&
0
 
pwang1973Author Commented:
Thanks for the reply,

howver after I download the .jar and the startup.html, I got a error the applet not inited, it seems that it cannot access the class in the jar file, after I download the class file, everything seems fine. What's happening?

Thanks
Pat
0
 
pwang1973Author Commented:
Attached the error msg, I put the jar into the same directory of the HTML, however it cannot find.
===============================

load: class SpreadSheet.class not found.

java.lang.ClassNotFoundException: SpreadSheet.class

      at sun.applet.AppletClassLoader.findClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at sun.applet.AppletClassLoader.loadClass(Unknown Source)

      at java.lang.ClassLoader.loadClass(Unknown Source)

      at sun.applet.AppletClassLoader.loadCode(Unknown Source)

      at sun.applet.AppletPanel.createApplet(Unknown Source)

      at sun.plugin.AppletViewer.createApplet(Unknown Source)

      at sun.applet.AppletPanel.runLoader(Unknown Source)

      at sun.applet.AppletPanel.run(Unknown Source)

      at java.lang.Thread.run(Unknown Source)
0
 
pwang1973Author Commented:
Caused by: java.io.FileNotFoundException: d:\ucdg_estim\SpreadSheet\class.class (The system cannot find the path specified)

      at java.io.FileInputStream.open(Native Method)

      at java.io.FileInputStream.<init>(Unknown Source)

      at java.io.FileInputStream.<init>(Unknown Source)

      at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)

      at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)

      at sun.applet.AppletClassLoader.getBytes(Unknown Source)

      at sun.applet.AppletClassLoader.access$100(Unknown Source)

      at sun.applet.AppletClassLoader$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now