http links don't work: Unsupported file type or connection not supported
Under Java 1.5.0 and Windows XP, if I try to click on a http: link
in an html window, I get:
Unsupported file type or connection not supported:
The #in_brower is a hack in the Ptolemy HTML code that says to open
the link in the external browser (IE, Firefox etc.)
This error message comes from Configuration.java
I believe the problem is that
<property name="Web Browser"
in ptolemy/configs/extendedEffigyFactory.xml is not handling the link.
#2 Updated by Chad Berkley over 11 years ago
I've been looking into this and it appears to be a problem on windows and linux but not OSX. The BrowserEffigy$Factory appears to be returning the effigy correctly so I'm not sure why the window does not appear. I think it must not be finding a default browser but I'm not sure yet.
#3 Updated by Chad Berkley over 11 years ago
This looks like a bug in the somewhat sketchy class ptolemy.actor.gui.BrowserLauncher. This class was written in 2001 and attempts to find a default browser on a system. In its locateBrowser() method, it attempts to somewhat smartly figure out where the browser is, but if it fails, it defaults to some pretty basic commands for launching a browser. On Windows, it tries to use command.com or cmd.exe and on *nix it tries 'firefox'. On my linux machine, my /usr/bin/firefox symlink was pointed to an older version of ff, so it did not work. after fixing the link, it did launch the link correctly. On windows, if a default browser is not set for the system (as was the case on my parallels install) cmd.exe or command.com will not be able to find an app to open the html document.
It looks like the original authors of this class went to great pains to figure this problem out. It does not appear that sun has made an easy way to open a browser from Java 1.5.x, although there is a launcher in java 1.6
There are several other solutions out there that people have written since BrowserLauncher was written. We could try one of those solutions to see if they work better.
Any input on this issue is appreciated.
#5 Updated by Christopher Brooks over 11 years ago
I agree that ptolemy.actor.gui.BrowserLauncher is somewhat sketchy.
However, it works fine for me under Ptolemy and fails under Kepler.
So, I suspect some other issue that might be affecting other facilities.
I'll see if I can replicate this later.
The most elegant solution would be to require Java 1.6, but I'm not
ready for that.
My concern with going with a different browser launcher is that it might require
making a bunch of changes to the Ptolemy tree or else having Kepler
specific versions of class files.
It might be easier to address the bug in Kepler and stick with BrowserLauncher
until Java 1.6 is required, which would probably be the next major release.
Just my $0.02.
#6 Updated by Christopher Brooks over 11 years ago
I can no longer reproduce this? I'm not sure what's up, or what changed?
I tried it on the same machine (my laptop with XP) with building Kepler
from source and with the http://kepler-project.org/dist/kepler-1.0.0rc1.exe
installer. I also tried both under Windows 2003 Server with Windows Remote
I was able to reproduce this several times. I'm not sure why I can't
reproduce this now.
I'd prefer to see this bug closed. Once we move to Java 1.6, we could
address how the browser should be opened. I'm leaving it up to Chad to close