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

Scala example source code file (java.policy)

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

Java - Scala tags/keywords

project_lib_base, project_lib_base

The Scala java.policy source code

// See http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html
// See http://mindprod.com/jgloss/policyfile.html
// The policy expands ${/} to the correct path or folder delimiter on your host platform.

// Actions available with SocketPermission: accept, connect, listen, resolve
// 1) The "resolve" action is implied when any of the other actions are present.
// 2) The "listen" action is only meaningful when used with "localhost".

grant {
    permission java.net.SocketPermission "*:80", "connect,accept,listen";
    permission java.net.SocketPermission "*:1024-", "connect,accept,listen";
    permission java.util.PropertyPermission "scala.remoting.logLevel", "read";
    permission java.util.PropertyPermission "scala.remoting.port", "read";
};

grant codeBase "@PROJECT_LIB_BASE@" {
    permission java.lang.RuntimePermission "getClassLoader";
    permission java.util.PropertyPermission "java.rmi.server.codebase", "read";
    permission java.util.PropertyPermission "java.rmi.server.hostname", "read";
    permission java.util.PropertyPermission "sun.rmi.dgc.server.gcInterval", "read,write";
};

//grant {
//    permission java.security.AllPermission;
//};

Other Scala examples (source code examples)

Here is a short list of links related to this Scala java.policy 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.