Link to home
Start Free TrialLog in
Avatar of xenia27
xenia27Flag for Taiwan, Province of China

asked on

Signed Applet

Hi,


First, I am facing this problem of SecurityException.  And I realize it's because my applet is not signed applet...correct me if I'm wrong...as I search through the net and I am still not understand well.  Now I am wondering how can I write an applet which can be acceptable for different browser?  I notice that there are different ways to do this for different browser, such as, Netscape and IE.  Is there a way I can make my applet work for all browser?  If so, how can I do this?  Any example?

Also, I would like to know whether I need to change my codes of "index.html" to make this work.

Finally, not sure why I got this exception "java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)" when I tried to close my applet...what's wrong?


Xenia

Avatar of Mick Barry
Mick Barry
Flag of Australia image


If its a Java2 applet then there is one way to sign it for all browsers. Is this the case?
No change needed to html
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xenia27

ASKER

OK...let me make sure my problem...if I got this SecurityException, then, that means I need to sign my applet, right? @@
actually looking at it, it may just be that you are trying to call System.exit() in your applet.
Applets cannot do that.
Avatar of xenia27

ASKER

so if I call some methods which applets cannot do will also cause SecurityException?  What if SecurityException with "access denied"???  >"<  Getting so confused with all these signed applets and security exception...
here are some of the things unsigned applets cannot do
http://java.sun.com/docs/books/tutorial/applet/practical/security.html
the stack trace for the exception is also useful for determining what line caused the error
> I tried to close my applet...what's wrong?


you cannot close applets, they are embedded in the browser page.
they keep running until the page is unloaded.
>> I tried to close my applet...what's wrong?

Was it running in Appletviewer and you tried to close that?
Avatar of xenia27

ASKER

OK...I see why I have error message when I tried to close my applet...I cannot close any applets...>"<...
OK...try to figure out what's wrong with SecurityException (access denied)...
thats just saying access to that method is denieed.
Avatar of xenia27

ASKER

OK....got what's wrong with my codes...>"<...my mistake...
Thanks for your helps~
What was wrong ;-) ?