javax.jnlp.BasicService Java Examples

The following examples show how to use javax.jnlp.BasicService. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebstartPersistence.java    From marauroa with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates a instance of class
 */
public WebstartPersistence() {
	try {
		ps = (PersistenceService) ServiceManager.lookup("javax.jnlp.PersistenceService");
		bs = (BasicService) ServiceManager.lookup("javax.jnlp.BasicService");

		if (ps != null && bs != null) {
			codebase = bs.getCodeBase();
		}

	} catch (UnavailableServiceException e) {
		e.printStackTrace(System.err);
		ps = null;
		bs = null;
	}
}
 
Example #2
Source File: Jnlp.java    From libreveris with GNU Lesser General Public License v3.0 5 votes vote down vote up
public BasicServiceFacade ()
{
    try {
        service = (BasicService) ServiceManager.lookup(
            "javax.jnlp.BasicService");
        logger.debug("Real BasicService available");

        // Use JNLP cache for all downloads
        JnlpResponseCache.init();
    } catch (UnavailableServiceException ex) {
        logger.debug("No BasicService available");
    }
}