Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://browserlauncher.sourceforge.net/
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic