alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (java.policy.allow)

This example Java source code file (java.policy.allow) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

all, files

The java.policy.allow Java example source code

/*
 *
 *
 * Policy file used by unit tests for attach API
 */
grant {
    permission com.sun.tools.attach.AttachPermission "attachVirtualMachine";
    permission com.sun.tools.attach.AttachPermission "createAttachProvider";

    /* implementation specific */
    permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
    permission java.lang.RuntimePermission "accessClassInPackage.sun.tools.attach";
    permission java.lang.RuntimePermission "accessClassInPackage.sun.jvmstat.monitor";
    permission java.lang.RuntimePermission "loadLibrary.attach";
    permission java.util.PropertyPermission "sun.jvmstat.*", "read";
    permission java.util.PropertyPermission "java.io.tmpdir", "read";

    /* to read configuration file in META-INF/services, and write/delete .attach_pid<pid> */
    permission java.io.FilePermission "<", "read,write,delete";
};

Other Java examples (source code examples)

Here is a short list of links related to this Java java.policy.allow source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.