Cannot update security settings in java.policy: File is read-only
 
Product:
 
Export Utility for Notes
>
Java Libraries
>
Version
All
 
Platform(s):
 
All
 
Edition(s):
 
All
 
Doc Number:
 
1000078
Published
21-May-2015
Last Updated: 30-Nov-2023
 Problem
When installing the Java libraries in the Notes client one of the following errors is displayed:
Error: Cannot update security settings in [Notes client path]\jvm\lib\security\java.policy: File is read-only
Could not update the java policy file (java.policy). Update the file manually.
 Solution
This error occurs because the logged in user account does not have access to update the Notes java.policy or java.pol files in the Notes JVM lib \ security folder. The following messages may be displayed:
The policy files recognized by Notes / Domino can be found in the java.security file located in the jvm \ lib \ security folder.
In Notes 10.x or earlier the following lines can be found in the java.security file:
policy.url.1=
file:$
{java.home}/lib/security/java.policy
policy.url.2=
file:$
{java.home}/lib/security/java.pol
policy.url.3=
file:///$
{user.home}/.java.policy
In Notes 11.x the following lines can be found in the java.security file:
policy.url.1=
file:$
{java.home}/lib/security/java.policy
policy.url.2=
file:///$
{user.home}/.java.policy
Note that the java.pol file is no longer recognized in Notes / Domino 11.x however has been reinstated in Domino 12.0.1.
In Notes 12.0.1 or later the following lines can be found in the java.security file:
policy.url.1=
file:$
{java.home}/lib/security/java.policy
policy.url.2=
file:$
{java.home}/lib/security/java.pol
policy.url.3=
file:$
{user.home}/.java.policy
For exports being run in a Notes client it is recommended the file specified for the {user.home} directory be manually created using a text editor application such as Notepad. In Windows this folder is typically 'C:\Users\[Username]' where username matches the Windows login name. Example: C:\Users\FSmith. Therefore a file called .java.policy be created in the user folder (example: C:\User\FSmith\.java.policy).
If you prefer to use a policy file located in the jvm \ lib \ security folder then it is recommended a file called
java.pol
be created in this folder using a text editor application such as Notepad. Be aware though this file might not be recognized if you're using Notes / Domino 11.
Note: If you create the file in the jvm \ lib \ security folder you may need to start Notepad with Administrator access to be able to save files to that folder:
After creating the policy file that will be used add the following lines to it:
grant {
permission java.security.AllPermission;
};
Save and close the file
Note: the reason why it's not recommended to update the java.policy file is because changes made to this file get cleared out when Notes / Domino patches & updates are applied.
Restart the Notes client (or Domino server).
If you apply patch updates to the Domino server or Notes client the java.pol file might be removed and placed in a backup folder. You should check this after applying updates and restore the java.pol file to the jvm\lib\security folder if required.
Related Support Notes
Manually downloading & installing Java Libraries ...
©
2023
AGE Computer Consultancy. All rights reserved.
Material may not be reproduced or distributed in any form without permission.