Project

General

Profile

Bug #3107

http links don't work: Unsupported file type or connection not supported

Added by Christopher Brooks over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
core
Target version:
Start date:
01/28/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3107

Description

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:     
http://ptolemy.eecs.berkeley.edu#in_browser

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"
class="ptolemy.actor.gui.BrowserTableau$Factory"/>
in ptolemy/configs/extendedEffigyFactory.xml is not handling the link.

History

#1 Updated by Chad Berkley over 11 years ago

moving to 1.0

#2 Updated by Chad Berkley about 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 about 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
(http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)).

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.
http://www.centerkey.com/java/browser/

Any input on this issue is appreciated.

#4 Updated by Dan Higgins about 11 years ago

Chad,
The BareBoneBrowserLaunch you reference in http://www.centerkey.com/java/browser/ is already in Kepler. Check the file src/org/geon/BrowserDisplay.java. I added it there to get the BrowserDisplay actor to work.

#5 Updated by Christopher Brooks about 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 about 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
Desktop.

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
this bug.

#7 Updated by Chad Berkley about 11 years ago

I'm closing this. We can revisit this problem when ptII and Kepler require Java 1.6. At that point, we can change the code to use Sun's browser launcher code.

#8 Updated by Redmine Admin about 6 years ago

Original Bugzilla ID was 3107

Also available in: Atom PDF