Running Java 6 Applet on Mac OS X Leopard
by Aleksejs
About year ago Apple released Java SE 6 for Mac OS X. But still Java SE 6 is available only for 64-bit Intel based Mac users, who uses Mac OS X Leopard. And still you can’t run Java 6 applets in your Safari, Firefox or Camino, because these browser are 32-bit applications and they can use 64-bit Java 6.
But I found some solution for me. I hope it will be useful for you too.
Command line tool appletviewer
There is a command line tool appletviewer in JRE. All you need, is type in terminal:
appletviewer http://www.example.com/applet.html
Note: If Java SE 6 is not default for Java applications, then you need use full path:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/appletviewer http://www.example.com/applet.html
Java Policy
If the applet crashes with an execption java.security.AccessControlException: access denied, then you need to create .java.policy file in your home directory with contents:
grant {
permission java.security.AllPermission;
};
and try again to launch appletviewer.
Note: You can use policytool to manage this file, if you create custom security policy. Here is tutorial.
Note: Agree with Jason Petersen. If you will leave policy file like it is in example, it will provide uncontrolled access to any applet. Please follow tutorial to more detailed access control.
hi , im trying install a certificate with the latest java 6 on mac , but is not working , i try several browsers and no luck.
do you any commands(solution ) so that java will work on 10.5.7.
also i have a tiger and i still cant use java to downkoad or install certificate .the certificate as the right dates.
where the steps i did si far.
i did the download of the certificate from a windows machine and use a pen to copy on mac .
i install the certificate on keychain but no luck for java.
also i use shiira browser it seems the most close to run java 6 on mac , because the image of java appers when using shira insted of the x.
also when im trying to istall in keychain, i try to install in system give this error:CSSM_ERRCODE_MEMORY_ERROR
This is incredibly unsafe, and irresponsible to suggest. This grants any arbitrary Applet full access to your system (including reading, deleting files, opening sockets, etc.). If you follow these instructions, you may get what you deserve.
Instead, grant access to only one site, file or person:
grant codeBase “file:${java.home}/-” {
permission java.security.AllPermission;
};
is a quick way to say “All java applets stored in my home folder get all access.
The “policytool” executable included with Java (run “policytool” from Terminal) is a handy way to easily update your .java.policy file.