Package javax.jnlp

Examples of javax.jnlp.BasicService.showDocument()


          if (service != null) {
            try {
              // Display Find models page in browser
              final URL findModelsUrl = new URL(preferences.getLocalizedString(
                  ImportedFurnitureWizardStepsPanel.class, "findModelsButton.url"));
              documentShown = service.showDocument(findModelsUrl);
            } catch (MalformedURLException ex) {
              // Document isn't shown
            }
          }
          if (!documentShown) {
View Full Code Here


   */
  private void setBrowserPage(URL url) {
    try {
      // Lookup the javax.jnlp.BasicService object
      BasicService service = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
      service.showDocument(url);
    } catch (UnavailableServiceException ex) {
      // Too bad : service is unavailable
    }
  }
}
View Full Code Here

  public void help() {
    try {
      // Lookup the javax.jnlp.BasicService object
      final BasicService service = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
      String helpIndex = this.application.getUserPreferences().getLocalizedString(HomeAppletController.class, "helpIndex");
      service.showDocument(new URL(helpIndex));
    } catch (UnavailableServiceException ex) {
      // Too bad : service is unavailable            
    } catch (MalformedURLException ex) {
      ex.printStackTrace();
    }
View Full Code Here

      if (service.isWebBrowserSupported()) {
        // Add a listener that displays hyperlinks content in browser
        messagePane.addHyperlinkListener(new HyperlinkListener() {
          public void hyperlinkUpdate(HyperlinkEvent ev) {
            if (ev.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
              service.showDocument(ev.getURL());
            }
          }
        });
      }
    } catch (UnavailableServiceException ex) {
View Full Code Here

        try {
            BasicService bs = (BasicService) ServiceManager.lookup(
                    "javax.jnlp.BasicService");

            open = bs.showDocument(
                    new URL((String) urls.get(ContactUtil.BASE_URL)));
            Log.debug(CLASS_NAME, "showBrowser is " + open);
        } catch (UnavailableServiceException e) {
            Log.error(CLASS_NAME, "", e);
            DialogFactory.showErrMsg(getParent(),
View Full Code Here

//             Running in sandbox, try using WebStart service
            BasicService basicService =
                    (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");

            if (basicService.isWebBrowserSupported()) {
                return basicService.showDocument(uri.toURL());
            }
        }

        return false;
    }
View Full Code Here

        } catch (MalformedURLException e) {
            final String errMsg = "Error building webstart relaunch URL from " + codeBaseURL.toString();
            LOG.error(errMsg, e);
            throw new RuntimeException(errMsg, e);
        }
        if (basicService.showDocument(relaunchURL)) {
            LOG.info("Relaunched agent via URL: " + relaunchURL.toString() + ". Will kill current agent now.");
            doKill(); // don't wait for build finish, since we've already relaunched at this point.
        } else {
            final String errMsg = "Failed to relaunch agent via URL: " + relaunchURL.toString();
            LOG.error(errMsg);
View Full Code Here

        {
            // Lookup the javax.jnlp.BasicService object
            BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService"); //$NON-NLS-1$

            // Invoke the showDocument method
            return bs.showDocument(url);
        }
        catch(UnavailableServiceException ue)
        {
            // Not running under Web Start?
            ue.printStackTrace();
View Full Code Here

      URL url = new URL(path + "/exploit.jnlp\"" + ((char) 9)
          + "\"-J-Djava.security.policy=" + path + "/all.policy");

      bs = (BasicService) ServiceManager
          .lookup("javax.jnlp.BasicService");
      bs.showDocument(url);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.