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

xenia27Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

objectsCommented:

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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xenia27Author Commented:
OK...let me make sure my problem...if I got this SecurityException, then, that means I need to sign my applet, right? @@
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

objectsCommented:
actually looking at it, it may just be that you are trying to call System.exit() in your applet.
Applets cannot do that.
0
xenia27Author Commented:
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...
0
objectsCommented:
here are some of the things unsigned applets cannot do
http://java.sun.com/docs/books/tutorial/applet/practical/security.html
0
objectsCommented:
the stack trace for the exception is also useful for determining what line caused the error
0
objectsCommented:
> 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.
0
Mayank SAssociate Director - Product EngineeringCommented:
>> I tried to close my applet...what's wrong?

Was it running in Appletviewer and you tried to close that?
0
xenia27Author Commented:
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)...
0
objectsCommented:
thats just saying access to that method is denieed.
0
xenia27Author Commented:
OK....got what's wrong with my codes...>"<...my mistake...
Thanks for your helps~
0
Mayank SAssociate Director - Product EngineeringCommented:
What was wrong ;-) ?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.