Skip to main content

Using the jdic browser when clicking a URL link

10 replies [Last post]
markso
Offline
Joined: 2006-02-17
Points: 0

I'm a bit stuck on how to use the jdic browser when clicking an external url link from within a JavaHelp page. The documentation isn't too clear on this so any pointers would be gratefully received.

Thanks

Mark

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jms
Offline
Joined: 2006-06-24
Points: 0

To help others with the same problem:
Found a solution in an old thread. Works fine by overwriting one class and configuration:
http://forum.java.sun.com/thread.jspa?threadID=728061&tstart=150.

midnightjava
Offline
Joined: 2007-07-04
Points: 0

> To help others with the same problem:
> Found a solution in an old thread. Works fine by
> overwriting one class and configuration:
> http://forum.java.sun.com/thread.jspa?threadID=728061&
> tstart=150.

I'm trying to get external links to load in the Browser via JDIC. I tried the solution linked to here, and it doesn't work for me. I'm posting here since the linked post is even older than this one; and no one seems to post on the Sun JavaHelp forums anymore.

First of all I couldn't get the code supplied to compile, since there is no explicit constructor provided. I added the following, since I didn't know what else to do with the argument passed in to the constructor.

public ExternalLinkContentViewerUI(JHelpContentViewer x){
super(x);
}

Then the code compiles, but when I launch JavaHelp and click an external link, the hyperlink listener doesn't fire.

Anyone have any ideas?

midnightjava
Offline
Joined: 2007-07-04
Points: 0

I figured out how to make this work. See the link above for the code that worked for me.

dougnlizt
Offline
Joined: 2008-07-24
Points: 0

I haven't been able to get this to work. I'm using the javahelp within a module (using the Netbeans IDE), so not sure if that has something to do with it. Any thoughts/help would be appreciated.

brinkley
Offline
Joined: 2003-06-06
Points: 0

It would be strict replacement for all the viewers not just one that is external. If you want something for just an external link it would require customization.

Binky

davetron5000
Offline
Joined: 2003-06-10
Points: 0

And by customization, he means not using the JavaHelp viewer/browser components at all. I had a similar issue, and the ability to act on a HyperlinkEvent inside the help viewer is not possible. It also did not seem possible to create a custom UI subclass and substitute that; the hyperlink viewing code is very deep in the impelmentation and it was not obvious how to override that functionality without just rewriting the components or writing your own help content viewer. Ultimately, I had to not provide that feature, as it was not deemed useful enough to warrant the time investment. Maybe a future version will provide addHyperlinkListener or something.

jms
Offline
Joined: 2006-06-24
Points: 0

Now it's 2007. May be there is an example how to implement opening links in an external browser?

Roger Brinkley

As I remember it the way to do it has always been there using
light-weight components and jnlp. Alternatively you could use the jnlp
browser which uses the external browser internally within the JavaHelp GUIs.

Binky

javahelp@JAVADESKTOP.ORG wrote:
> Now it's 2007. May be there is an example how to implement opening links in an external browser?
> [Message sent by forum member 'jms' (jms)]
>
> http://forums.java.net/jive/thread.jspa?messageID=230042
>
> ********************************************************************************
>
> You may leave the list at any time by sending message with no subject and
> "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
> are available at http://archives.java.sun.com/archives/javahelp-interest.html.
> Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Chris King

The following question was asked on April 16 in JAVAHELP-INTEREST:

"Can I embed Javahelp in the jarfile of my application, making it
downloadable without accepting the Javahelp license."

The response was:

"Humm. Are you talking about the open source version (yes if your code is
GPL) or the distributed version (no, but you can include the binary
distribution (jh.jar) without any problem)?"

The follow-up response was:

"My project (edumips64 -> www.edumips.org) is a GPL project.
I'd like to include binaries of javahelp inside my jarfile: is it possible
to
do so?

I didn't do it because I know that sun requires you to accept an agreement
before downloading Java, and javahelp had a similar agreement when I tried
to download it."

My open source project is currently in a similar situation and I was
wondering what the answer is to the last question. Can we, for example,
include jh.jar within our project making it downloadable without accepting
the Javahelp license?
_________________

Chris King
Information Development - Aperi
chriskng@us.ibm.com
Aperi: http://www.eclipse.org/aperi/index.php

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.
[att1.html]

Roger Brinkley

The quick answer to this is if your using the jh.jar file from Sun then
you are agreeing to the binary license and the redistribution rules. If
your using the open source project and build javahelp on your own they
you can use it according to the rules of the license which is GPL. Since
JavaHelp is under GPL if you redistribute it you have to redistribute all
of your code under GPL. That may or may not be what you want to do.

binky

Chris King wrote:
> The following question was asked on April 16 in JAVAHELP-INTEREST:
>
> "Can I embed Javahelp in the jarfile of my application, making it
> downloadable without accepting the Javahelp license."
>
> The response was:
>
> "Humm. Are you talking about the open source version (yes if your code
> is GPL) or the distributed version (no, but you can include the binary
> distribution (jh.jar) without any problem)?"
>
> The follow-up response was:
>
> "My project (edumips64 -> www.edumips.org) is a GPL project.
> I'd like to include binaries of javahelp inside my jarfile: is it
> possible to
> do so?
>
> I didn't do it because I know that sun requires you to accept an
> agreement before downloading Java, and javahelp had a similar agreement
> when I tried to download it."
>
> My open source project is currently in a similar situation and I was
> wondering what the answer is to the last question. Can we, for example,
> include jh.jar within our project making it downloadable without
> accepting the Javahelp license?
> _________________
>
> Chris King
> Information Development - Aperi
> chriskng@us.ibm.com
> Aperi: http://www.eclipse.org/aperi/index.php
> ********************************************************************************
>
>
> You may leave the list at any time by sending message with no subject
> and "SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM.
> Archives are available at
> http://archives.java.sun.com/archives/javahelp-interest.html. Submit bug
> reports at http://java.sun.com/cgi-bin/bugreport.cgi.
>

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.