Logo Search packages:      
Sourcecode: icedtea-web version File versions  Download package

static void net::sourceforge::jnlp::runtime::JNLPRuntime::initialize ( boolean  isApplication  )  throws IllegalStateException [inline, static]

Initialize the JNLP runtime environment by installing the security manager and security policy, initializing the JNLP standard services, etc.

This method cannot be called more than once. Once initialized, methods that alter the runtime can only be called by the exit class.

Parameters:
isApplication is true if a webstart application is being initialized
Exceptions:
IllegalStateException if the runtime was previously initialized

Definition at line 176 of file JNLPRuntime.java.

References baseDir, checkHeadless(), checkInitialized(), getDefaultBaseDir(), handler, headless, indicator, initialized, isWebstartApplication(), loadWindowIcon(), policy, security, securityEnabled, and windowIcon.

                                                                                      {
        checkInitialized();

        isWebstartApplication = isApplication;

        //Setting the system property for javawebstart's version.
        //The version stored will be the same as java's version.
        System.setProperty("javawebstart.version", "javaws-" +
            System.getProperty("java.version"));

        if (headless == false)
            checkHeadless();

        if (!headless && windowIcon == null)
            loadWindowIcon();

        if (!headless && indicator == null)
            indicator = new DefaultDownloadIndicator();

        if (handler == null)
            handler = new DefaultLaunchHandler();

        if (baseDir == null)
            baseDir = getDefaultBaseDir();

        if (baseDir == null)
            throw new IllegalStateException(JNLPRuntime.getMessage("BNoBase"));

        ServiceManager.setServiceManagerStub(new XServiceManagerStub()); // ignored if we're running under Web Start

        policy = new JNLPPolicy();
        security = new JNLPSecurityManager(); // side effect: create JWindow

        if (securityEnabled) {
            Policy.setPolicy(policy); // do first b/c our SM blocks setPolicy
            System.setSecurityManager(security);
        }

        initialized = true;
    }


Generated by  Doxygen 1.6.0   Back to index