hi, i got a error "Caught exception java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)" when running applet in browser. But it is ok when used appetviewer. why?? and how to use policy file in applet? I mean not using appletviewer -J-Djava.security.policy=<policyfilename>. Thank you.
Because the appletviewer doesn't have the strict sandbox rules that browsers do. Check out some of my other recent posts about why applets are better off not using jdbc directly.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
a bit of art, as a gift, that will fit in a stocking