Can JNLP be used to start a browser, in an application that's not Java Web Start?
posted 12 years ago
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.