Back to index

lightning-sunbird  0.9+nobinonly
Static Public Member Functions | Static Private Member Functions | Static Private Attributes
netscape.oji.MRJSession Class Reference

Performs startup actions on behalf of the MRJ plugin. More...

List of all members.

Static Public Member Functions

static void open (String consolePath) throws IOException
static void close () throws IOException

Static Private Member Functions

static Properties loadProperties (String pluginHome)

Static Private Attributes

static PrintStream out
static PrintStream err
static PrintStream console

Detailed Description

Performs startup actions on behalf of the MRJ plugin.

  1. Sends System.out/err to a specified disk file.
  2. Installs an appropriate security manager for integrating with the Netscape 6 security system.

Definition at line 53 of file

Member Function Documentation

static void netscape.oji.MRJSession.close ( void  ) throws IOException [inline, static]

Definition at line 108 of file

static Properties netscape.oji.MRJSession.loadProperties ( String  pluginHome) [inline, static, private]

Definition at line 59 of file

        Properties props = new Properties();
        try {
            InputStream propsStream = new FileInputStream(pluginHome + "/");
        } catch (IOException ex) {
        return props;

Here is the caller graph for this function:

static void ( String  consolePath) throws IOException [inline, static]

Definition at line 70 of file

        String pluginHome = System.getProperty("netscape.oji.plugin.home");
        Properties props = loadProperties(pluginHome);
        boolean append = Boolean.valueOf(props.getProperty("netscape.oji.plugin.console.append")).booleanValue();
        // Make sure the parent directories exist.
        File consoleFile = new File(consolePath);
        File parentFile = consoleFile.getParentFile();
        if (!parentFile.exists()) {
        // redirect console I/O to specified file.
        MRJSession.out = System.out;
        MRJSession.err = System.err;
        console = new PrintStream(new FileOutputStream(consolePath, append));

        Date date = new Date();
        String version = props.getProperty("netscape.oji.plugin.version");
        System.out.println("MRJ Plugin for Mac OS X v" + version);
        System.out.println("[starting up Java Applet Security @ " + date + "]");

        // bring up MRJ Applet Security.
        if (System.getSecurityManager() == null) {
            try {
                // make sure that the classes in MRJPlugin.jar are granted all permissions.
                // see p. 117 of "Inside Java 2 Platform Security" for more information.
                System.setProperty("", "file:" + pluginHome + "/MRJPlugin.policy");
                String name = props.getProperty("");
                SecurityManager securityManager = (SecurityManager) Class.forName(name).newInstance();
            } catch (Exception ex) {

Here is the call graph for this function:

Member Data Documentation

PrintStream netscape.oji.MRJSession.console [static, private]

Definition at line 57 of file

PrintStream netscape.oji.MRJSession.err [static, private]

Definition at line 56 of file

PrintStream netscape.oji.MRJSession.out [static, private]

Definition at line 55 of file

The documentation for this class was generated from the following file: