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

ApplicationInstance net::sourceforge::jnlp::Launcher::launch ( JNLPFile  file,
Container  cont 
) throws LaunchException [inline]

Launches a JNLP file inside the given container if it is an applet. Specifying a container has no effect for Applcations and Installers.

file the JNLP file to launch
cont the container in which to place the application, if it is an applet
the application instance
LaunchException if an error occurred while launching (also sent to handler)

Definition at line 200 of file Launcher.java.

References net::sourceforge::jnlp::Launcher::TgThread::getApplication(), net::sourceforge::jnlp::Launcher::TgThread::getException(), handler, net::sourceforge::jnlp::LaunchHandler::launchCompleted(), launchWarning(), and R().

        TgThread tg;

        //First checks whether offline-allowed tag is specified inside the jnlp
        if (!file.getInformation().isOfflineAllowed()) {
            try {
                //Checks the offline/online status of the system.
                //If system is offline do not launch.

            } catch (UnknownHostException ue) {
                System.err.println("File cannot be launched because offline-allowed tag not specified and system currently offline.");
                return null;
            } catch (Exception e) {

        if (file instanceof PluginBridge && cont != null)
                tg = new TgThread(file, cont, true);
        else if (cont == null)
                tg = new TgThread(file);
                tg = new TgThread(file, cont);


        try {
        catch (InterruptedException ex) {
                        //By default, null is thrown here, and the message dialog is shown.
            throw launchWarning(new LaunchException(file, ex, R("LSMinor"), R("LCSystem"), R("LThreadInterrupted"), R("LThreadInterruptedInfo")));

        if (tg.getException() != null)
            throw tg.getException(); // passed to handler when first created

        if (handler != null)

        return tg.getApplication();

Generated by  Doxygen 1.6.0   Back to index