Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Security Policy file entry to allow "Arrays.useLegacyMergeSort" to be set ?

Mike DaviesJul 4 2016 — edited Jul 6 2016

Hi,

Question as title :

I need to run a legacy Java  desktop application under a Java Security Policy file.  The application calls the following :

System.setProperty("java.util.Arrays.useLegacyMergeSort", "true");

When this line executes I get an exception as follows :

"Exception in thread "main" java.security.AccessControlException: access denied (

java.util.PropertyPermission java.util.Arrays.useLegacyMergeSort write)

        at java.security.AccessControlContext.checkPermission(Unknown Source)..."

I have added the following (and several variants of it) to my Java Security Policy file with no luck,  can anyone tell me what I am doing wrong please ?

grant {

    permission java.security.SecurityPermission "setProperty.java.util.Arrays.useLegacyMergeSort";

};

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2016
Added on Jul 4 2016
2 comments
966 views