aspose file tools*
The moose likes JNLP and Web Start and the fly likes Can JNLP be used to start a browser, in an application that's not Java Web Start? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Can JNLP be used to start a browser, in an application that Watch "Can JNLP be used to start a browser, in an application that New topic
Author

Can JNLP be used to start a browser, in an application that's not Java Web Start?

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
My Java application has a built-in Web server. Web clients can connect to the application, using a Web browser, to see the application's GUI.
However, users currently have to start a browser themselves and type in an appropriate URL, even when sitting at the same machine as the application. I would like the application to fire up a browser on its local machine and open the URL of the main page of the GUI.
It seems as if JNLP provides facilities to do this, but I have not had success in using it.
If I put the JNLP Jars on the class path (and the javaws directory in java.library.path), I can call ServiceManager.lookup(), to try to get a BasicService, which would provide the showDocument() method. However, a BasicService is not available. The lookup() method throws UnavailableServiceException with a message of "uninitialized".
Is what I am doing doomed or is there something I could change to make it work?
I append some code.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Brian Pipa
Ranch Hand

Joined: Sep 29, 2003
Posts: 299
http://browserlauncher.sourceforge.net/


My Java Freeware:<br />MACCC - <a href="http://maccc.pipasoft.com" target="_blank" rel="nofollow">http://maccc.pipasoft.com</a><br />Nator - <a href="http://nator.pipasoft.com" target="_blank" rel="nofollow">http://nator.pipasoft.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can JNLP be used to start a browser, in an application that's not Java Web Start?