Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I configure Java Web Start



Uwe Dennerlein wrote:

Doug Zwick wrote:

We are talking about the BasicService.showDocument method here
(where the "no browser configured" message is originating)? As
far as I have been able to determine, it uses the system wide
preference defined by Safari's prefs dialog.

Interestingly, it looks like Safari implements this by setting
up bindings for HTML, HTTP and HTTPS with Launch Services. If
you look in ~/Library/Preferences/com.apple.LaunchServices.plist
for your browser's bundle ID (e.g. org.mozilla.firefox) you can
see the bindings it sets up. If the URL given to showDocument
does not hit one of these bindings, that could possibly be the
cause of the error message.

Note that if you change the bindings, you may need to jump through
a hoop or two to get them recognized -- do a google on lsregister
(its a command line tool under LaunchServices.framework).


Thanks Doug!

But your hont is a little bit too compicated for me. I've only few development experience in Java. The exact error message:

No browser configured! de.rbg.nbs.app.ba.util.BrowserException: could not connect to server folap.app.nbs.fiducia.de

I don't know, whether the BasicService.showDocument method causes the error. I have no access to the source code.

Is there a stack trace? That exception is being thrown by the Java app, not by JWS. BasicService.showDocument returns true or false depending on whether the URL could be handled, so the app could be throwing the exception based on the return value from this method, or it could be trying to do it itself, or using the old EJAlbert BrowserLauncher class, etc. You could try putting together a simple JWS app that just calls this method:

    URL u = new URL("http://www.apple.com/";);
    BasicService bs = (BasicService)
        ServiceManager.lookup("javax.jnlp.BasicService");
    boolean b = bs.showDocument(u);
    System.err.println("Returned " + b + " for " + u);

If this works, and other URLs also work, then JWS is just fine.

If it is just the one app that is giving you trouble, you may
have to take it up with the application vendor.

In ~/Library/Preferences/com.apple.LaunchServices.plist I can find the following inputs:

->Root->LSPrefsBindings->U:http->0:
   LSBundleIdentifier	String	org.mozilla.forefox
   LSBundleLocator	Data	<00000000 00a20003 00010 ...
   ...
->Root->LSPrefsBindings->U:http->0:
   LSBundleIdentifier	String	org.mozilla.forefox
   LSBundleLocator	Data	<00000000 00a20003 00010 ...
   ...

Nothing with "html" - nothing that looks like an URL (for me). Therefore, what "bindings" shall I change?

Mine has keys like "E:htm" and "E:html". My thought was that if the URL that cannot be opened is not of a type bound to the browser through LaunchServices, it could easily fail. The data blocks in each dict entry are opaque, so trying to synthesize a new one would be exceptionally tricky. However, the data block for the various firefox entries (E:, U: and T:) appear to be identical, you might be able to copy-and-paste to create new bindings. However, if the URL you are trying to open is already bound by Launch Services then that is not the problem. To test an URL you can try it in a Terminal window: open "http://www.apple.com/";

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.