• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://browserlauncher.sourceforge.net/
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic