This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Of course! Thanks! Interesting though, this class with the 'jep.setPage("http://www.yahoo.com");' method needs to be signed to work.
My other class (you advised me on yesterday) didn't need to be signed with the context.showDocument("http://www.yahoo.com");
Is there anyway I can make this code work without signing the applet?
The showDocument delegates the call to the browser/applet viewer which is outside the security restrictions of the applet. Thats why you can get it working even unsigned.
Why do you want to avoid signing? Self signing works and its quite a straight forward process.
The applet is a volunteer job for a friend's website. His company is launching a game in October. I'll add more function to it of course, some links going to different review websites and so on.
About my aversion to self-signing, when I self-sign the applet, a big ugly warning box pops up on the screen with a scary yellow warning triangle and basically says "Do you trust this person?". I think it makes my friend's website look unattractive! I guess it's unavoidable though, then again I could use a decent CA and pay for a digital signature, perhaps then the scary warning box could be ommitted.
By the way, the applet is not essential to my friend's business in anyway, he is just helping me out by giving me some voluntary work to put on my resume!
It's been a while since I worked with applets, and Oracle has made a lot of fixes to applet (and Java) security since then, so now I'm not sure how they work any more. It's possible that even using a corporate-grade digital signature from a recognized CA might still produce a warning box, but perhaps a less scary one. But I don't know that for sure.
However I can say that the company I worked for did run an application (for web ordering) which used a self-signed certificate for several years, and I never heard of any of our customers being scared off by the security dialog. I suppose that since it was on our website they assumed it was okay. People using the web routinely disregard web security, that's why malware writers are so successful.