Hi.
I've fixed this for the latest standalone AR versions (2.2-beta-2) by
including the
BrowserLauncher2 library ( http://sourceforge.net/projects/
browserlaunch2/ ) - which seems to do a pretty good job, with no
native code.
I like your simple swing solution, but you're right - this will
stumble when it finds a .jnlp file.
cheers
noel.
On 24 Apr 2006, at 19:40, Mark Taylor wrote:
> On Mon, 24 Apr 2006, Noel Winstanley wrote:
>
>>> - Most things I try to do from the GUI just pop a message in a
>>> JTextPane: "Cannot control browser Please go to ...". No doubt
>>> this is a consequence of the Luddite way I [refuse to] set up
>>> my desktop, so you may choose not to regard this as a bug.
>>>
>>
>> most of the things you are doing must be launching links to webpages.
>> Java webstart provides extra apis to do this - if the AR isn't
>> running under webstart, it falls back to just telling the user where
>> to go (so to speak).
>> It's a pity that standard java doesn't provide a browser-control
>> class - there's a range of 3rd-party libraries (either java code that
>> does os-detection, or native code like JDIC) that try to achieve
>> this, but few are very good (last time I looked). Maybe I should
>> provide something a little more ambitious for the fallback position -
>> I'll take a look at what's available.
>
> Having a horror of relying on anything outside the J2SE I implemented
> a pure Swing noddy HTML browser for use in bits of TOPCAT - most of
> the
> hard work is done by JEditorPane so it's not very difficult.
> See
>
> http://cvsweb.starlink.ac.uk/cvsweb.cgi/java/source/topcat/src/
> main/uk/ac/starlink/topcat/HtmlWindow.java
>
> if you're interested. Probably wouldn't get far with a .jnlp link
> though.
>
> --
> Mark Taylor Astronomical Programmer Physics, Bristol
> University, UK
> m.b...@br... +44-117-928-8776 http://www.star.bris.ac.uk/
> ~mbt/
>
|