Your applet is trying to read the temp directory value from the java.io.tmpdir system property, which has been prevailed. Applets run in a sandboxed environment with limited permissions for security reasons. To fix this, redefine the default security policy so that your applet can read the property by setting the property permission in the property - java.util.PropertyPermission . To override the default permissions, define the policy in your userโs .java.policy home file. It is recommended that you modify the user policy file rather than the global policy file in your JRE security directory. See Template below:
grant codeBase "<code base>" { permission <type> "<target>", "<actions>"; permission <type> "<target>", "<actions>"; ... }; For eg. grant codeBase "http://geosim.cs.vt.edu/geosim/-" { java.util.PropertyPermission "java.io.tmpdir", "read"; ... };
Edited by:
I noticed that you already have the applet link indicated in your message at the top. So, I give you a step by step guide to get you started.
Here you go -
Copy the file $ JRE_HOME / lib / security / java.policy to your home house (in windows this is c: \ users \ <username>) as a .java.policy file. Pay attention to the previous ".". in the file name.
Add the following lines to the end of the .java.policy file:
grant codeBase "http://www.wilutions.com/outldd/-" {
permission java.security.AllPermission; };
Launch the applet in appletviewer as follows and see if it works. appletviewer http://www.wilutions.com/outldd/example.html
- Please note that I specify all permissions for the applet for the sake of getting started, but it is potentially unsafe to grant all permissions. You must provide only the necessary permissions. Therefore, I leave it to you to understand it.
Drona source share