A Java class that allows applications to implement a security policy. Usually, the JavaSecurityManager becomes visible when it denies access to a resource like local files: java.security.Access''''''Control''''''Exception: access denied (java.io.File''''''Permission /foo.xml read) at java.security.Access''''''Control''''''Context.check''''''Permission(Access''''''Control''''''Context.java:269) at java.security.Access''''''Controller.checkPermission(Access''''''Controller.java:401) at java.lang.Security''''''Manager.checkPermission(Security''''''Manager.java:524) at java.lang.Security''''''Manager.checkRead(Security''''''Manager.java:863) at java.io.File.exists(File.java:678) at com.badguys.Bad''''''Code$Bad''''''Thread.run(Bad''''''Code.java:32) However, the most common example can be seen with Java applets which are prevented from: * accessing the file system * making network connections (for the most part) * creating new processes * creating class loaders If there is a security manager in place, the following operations will be checked: * Accept a socket connection from a specified host and port number * Modify a thread (change its priority, stop it, and so on) * Open a socket connection to a specified host and port number * Create a new class loader * Delete a specified file * Create a new process * Cause the application to exit * Load a dynamic library that contains native methods * Wait for a connection on a specified local port number * Load a class from a specified package (used by class loaders) * Add a new class to a specified package (used by class loaders) * Access or modify system properties * Access a specified system property * Read from a specified file * Write to a specified file Java applications, by default, won't use a security manager unless a ''policy file'' has been specified at the time of application launch. To specify a java policy read up on the following syntax: java -Djava.security.manager -Djava.security.policy=someURL SomeApp The system policy file is by default located at ''' ''java.home''/lib/security/java.policy''' see more at: http://java.sun.com/j2se/1.4.2/docs/guide/security/PolicyFiles.html ---- An attempt to implement something similar in the RubyLanguage is being made in the SecuredRuby project. ---- Is there something similar in Smalltalk? ----- contributors: AnonymousDonor''''''s, EricHerman