All Downloads are FREE. Search and download functionalities are using the official Maven repository.

weka.experiment.remote.policy.example Maven / Gradle / Ivy

Go to download

The Waikato Environment for Knowledge Analysis (WEKA), a machine learning workbench. This version represents the developer version, the "bleeding edge" of development, you could say. New functionality gets added to this version.

There is a newer version: 3.9.6
Show newest version
/* 
 * Necessary permissions for remote engines
 *
 * Example setup for user John Doe:
 * - home directory:
 *   /home/johndoe
 * - location of datasets:
 *   /home/johndoe/datasets/
 * - location of weka.jar:
 *   /home/johndoe/weka/weka.jar
 * - location of additional jars (e.g., for database access):
 *   /home/johndoe/jars
 * - remote engine directory (policy, start scripts, etc.):
 *   /home/johndoe/remote_engine
 *
 * Start Experimenter in directory /home/johndoe/remote_engine:
 *   java \
 *     -classpath /home/johndoe/jars/:/home/johndoe/weka/weka.jar \
 *     -Djava.rmi.server.codebase=file:/home/johndoe/weka/weka.jar \
 *     weka.gui.experiment.Experimenter
 *
 * Start remote engine on remote machine:
 * - cd to /home/johndoe/remote_engine
 * - start engine
 *   java -Xmx256m \
 *     -classpath remoteEngine.jar:/home/johndoe/weka/weka.jar:/home/johndoe/jars/ \
 *     -Djava.security.policy=remote.policy \
 *     weka.experiment.RemoteEngine &
 *
 * Note:
 * replace  with actual jar filename, e.g., mysql.jar
 *
 * Version: $Revision: 13925 $
 */

grant {

  // allow the remote engine to replace the context class loader.
  // This enables the unloading of types from the remote engine
  permission java.lang.RuntimePermission
    "setContextClassLoader";

  // allow the remote engine access to environment variables
  permission java.lang.RuntimePermission
    "getenv.*";

  // allow the remote engine access to the class loader
  permission java.lang.RuntimePermission
    "getClassLoader";

  // the following three permissions allow the MLRClassifier
  // (from the RPlugin package) to work properly. They can be
  // omitted if you don't plan on using RPlugin with the remote
  // servers
  permission java.lang.RuntimePermission
    "createClassLoader";

  permission java.lang.RuntimePermission
    "accessDeclaredMembers";

  permission java.lang.reflect.ReflectPermission
    "suppressAccessChecks”;

  // file permission for data sets
  permission java.io.FilePermission
    "/home/johndoe/datasets/-", "read";

  // file permissions for downloading classes from client file url's
  permission java.io.FilePermission
    "/home/johndoe/-", "read";
  permission java.io.FilePermission
    "/home/johndoe/weka/weka.jar", "read";

  // connect to or accept connections from unprivaleged ports and the http port
  permission java.net.SocketPermission 
    "*:1024-65535", "connect,accept,listen,resolve";
  permission java.net.SocketPermission
    "*:80", "connect";

  // file permission to load server classes from remoteEngine.jar.
  // only needed if RemoteEngine_Skel.class/_Stub.class are going to
  // be downloaded by clients (ie, if these files are not already in the
  // client's classpath). Normally this doesn't need to be changed.
  permission java.io.FilePermission
    "/home/johndoe/remote_engine/-", "read";

  // read write for properties
  permission java.util.PropertyPermission 
    "*", "read,write";

  // allow thread-based schemes to execute
  permission java.lang.RuntimePermission
    "modifyThread";
};






© 2015 - 2024 Weber Informatics LLC | Privacy Policy