com.ibm.security12.sun.misc
Class Main

java.lang.Object
  |
  +--com.ibm.security12.sun.misc.Main

public class Main
extends Object

The Main class is used to run applications under a security manager that is enforced by the current system policy. The application and its classes will be loaded using a SecureClassLoader. Currently, the Main class can be utilized if you make an interpreter call such as the following:

 java java.security.Main foo parm1 parm2
 
This executes the application named foo, with parameters parm1 and parm2. The interpreter first calls the main method in a Main object to install a new SecurityManager before actually invoking main in class foo with the specified parameters.

Since:
JDK1.0
Version:
1.00, 04/16/97
Author:
Tony Nadalin
See Also:
ClassLoader12, SecurityException, SecurityManager12, AccessController, Permission, ProtectionDomain

Constructor Summary
Main()
           
 
Method Summary
static void main(String[] argv)
           Used to install a new java.lang.SecurityManager as the system SecurityManager before invoking main in the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] argv)
                 throws Throwable

Used to install a new java.lang.SecurityManager as the system SecurityManager before invoking main in the specified class.

The first parameter is the name of the class containing the program's main method. The remaining parameters will be passed as the arguments to the main method.

An instance of SecureClassLoader will be used to load the specified application program and its classes.

Parameters:
argv - command line arguments (the application class name followed by the parameters to be passed to its main method).
Throws:
Throwable - if an error occurs while trying to invoke the main method in the target class.