Skip to main content

RE: [JAVAHELP] problem attempting to view helpset located on a we b server

9 replies [Last post]
Anonymous

Hi-

Thanks for the reply. No, we're using just http.

Kal Szigeti* Documentation Manager* SunGard *
Tel:516-798-1078* Cell :646-238-6458 * www.sungard.com

CONFIDENTIALITY: This e-mail (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this e-mail in error,
please notify the sender and delete this e-mail from your system.

-----Original Message-----
From: Roger Brinkley [mailto:Roger.Brinkley@SUN.COM]
Sent: Friday, April 21, 2006 10:34 AM
To: JAVAHELP-INTEREST@JAVA.SUN.COM
Subject: Re: [JAVAHELP] problem attempting to view helpset located on a
web server

Szigeti, Kal wrote:
> Hi-
> I've created a Java Help helpset using WWP. I can successfully view
> the help set in the help viewer when the files are on my local machine.
> However, when I upload the files to our web server, then specify the
> HelpSet URL, I get a "helpset not found" error.
>
> Anyone know why I would be able to view the helpset locally but not on
> the webserver? (I can also see the .hs file when I key in the URL in my
> browser).
>

Are you using https?

Binky

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

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.

*********************************************************************
The information contained in this e-mail message is intended only for the
personal and confidential use of the recipient(s) named above. If the reader
of this message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified that you
have received this document in error and that any review, dissemination,
distribution, or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately by
e-mail, and delete the original message.
*********************************************************************

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

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]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

Geoff Hall wrote:
> Our helpset file (fxpeHelp.hs) is in a jar file (fxpeHelp.jar).
> At the start of our application we find the URL of the helpset file by
> ClassLoader.getSystemClassLoader().getResource("fxpeHelp.hs");
> which returns the URL (as seen in the "path" field) of
> file:/C:/whittle/FX340/programs/jars/fxpeHelp.jar!/fxpeHelp.hs
>
> When this URL is used in the statment
> helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
> the statement fails with the error
> javax.help.HelpSetException: Could not parse
> Got an IOException (C:\whittle\FX340\programs\jars\fxpeHelp.jar!\fxpeHelp.hs
> (The system cannot find the path specified))
> Parsing failed for null
>
> The confusing part is that this code has been working for the past few years.
> This recent problem appears to have started because I upgraded to jdk/jre
> 1.5.0_06 from 1.4.2_04 and JavaHelp 2.0_02 from 1.1.2_01. I've had the same
> problem now with 1.4.2_04, so perhaps the JVM itself might be off the hook.
>
> The URL path is not what I expect to see from my playing around with browsers
> etc, but it is what is returned from the
> ClassLoader.getSystemClassLoader().getResource(...) method, so I assume it's
> alright.
>
> If I use a directory searchpath rather than the jar file (which we do in the
> development environment) the fxpeHelp.hs file is found and loaded without any
> problems. It's only having the problem when coming from the jar file.

Try loading the jared helpset with hsviewer. If you can do that then the
problem is in the programing portion. If you can't then we've got on
problem with the jdk.

Also does this work non jarred?

Binky

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

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.

Geoff Hall

The answer is yes to both (works in hsviewer and as non-jarred). That's how I
normally run it in development mode so didn't catch the problem until I'd
actually built a trial release system.

As I mentioned before, this section of the code (below) to find and load the
helpset has been working without change (verified by SourceSafe) since the
early days of Java and JavaHelp, so I'm a bit mystified why it should stop
working now.

Geoff

-----Original Message-----
From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM] On
Behalf Of Roger Brinkley
Sent: 25 April 2006 02:15
To: JAVAHELP-INTEREST@JAVA.SUN.COM
Subject: Re: [JAVAHELP] Locating a helpset in a jar file

Geoff Hall wrote:
> Our helpset file (fxpeHelp.hs) is in a jar file (fxpeHelp.jar).
> At the start of our application we find the URL of the helpset file by
> ClassLoader.getSystemClassLoader().getResource("fxpeHelp.hs");
> which returns the URL (as seen in the "path" field) of
> file:/C:/whittle/FX340/programs/jars/fxpeHelp.jar!/fxpeHelp.hs
>
> When this URL is used in the statment
> helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
> the statement fails with the error
> javax.help.HelpSetException: Could not parse
> Got an IOException (C:\whittle\FX340\programs\jars\fxpeHelp.jar!\fxpeHelp.hs
> (The system cannot find the path specified))
> Parsing failed for null
>
> The confusing part is that this code has been working for the past few years.
> This recent problem appears to have started because I upgraded to jdk/jre
> 1.5.0_06 from 1.4.2_04 and JavaHelp 2.0_02 from 1.1.2_01. I've had the same
> problem now with 1.4.2_04, so perhaps the JVM itself might be off the hook.
>
> The URL path is not what I expect to see from my playing around with browsers
> etc, but it is what is returned from the
> ClassLoader.getSystemClassLoader().getResource(...) method, so I assume it's
> alright.
>
> If I use a directory searchpath rather than the jar file (which we do in the
> development environment) the fxpeHelp.hs file is found and loaded without any
> problems. It's only having the problem when coming from the jar file.

Try loading the jared helpset with hsviewer. If you can do that then the
problem is in the programing portion. If you can't then we've got on
problem with the jdk.

Also does this work non jarred?

Binky

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

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.

Geoff Hall

I'm making some progress.
I discovered that I've never being loading the .hs file from the .jar file!
I had two copies of the help in the build and I deleted the source copy in
favour of the .jar copy (as you would) which made the trial build version
fall over.

Binky, you asked several emails ago whether hsviewer could load the helpset
from the jar file. My answer now is no - from either the command line or
the hsviewer window. So I've got a dodgy .jar file in as much as hsviewer
can't find the .hs file. If I load the .hs file from outside the .jar file,
then the help works correctly, using pages from the .jar file. I can see
the .hs file in the .jar file (using winzip). Any tips you can give on what
I need to be looking for would be appreciated!

During this path of discovery I also discovered that I couldn't get the
-hsURL switch to work with hsviewer (using the HolidayHistory helpset and
jar). Neither could I find any working examples in the documentation. Is
this switch supposed to work? (I'm using Java 1.5.0_06 and JavaHelp
2.0_02.)

Cheers
Geoff

> -----Original Message-----
> From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM]
> On Behalf Of Geoff Hall
> Sent: Wednesday, 26 April 2006 9:08 AM
> To: JAVAHELP-INTEREST@JAVA.SUN.COM
> Subject: Re: [JAVAHELP] Locating a helpset in a jar file
>
> The answer is yes to both (works in hsviewer and as non-jarred). That's
> how I
> normally run it in development mode so didn't catch the problem until I'd
> actually built a trial release system.
>
> As I mentioned before, this section of the code (below) to find and load
> the
> helpset has been working without change (verified by SourceSafe) since the
> early days of Java and JavaHelp, so I'm a bit mystified why it should stop
> working now.
>
> Geoff
>
> -----Original Message-----
> From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM]
> On
> Behalf Of Roger Brinkley
> Sent: 25 April 2006 02:15
> To: JAVAHELP-INTEREST@JAVA.SUN.COM
> Subject: Re: [JAVAHELP] Locating a helpset in a jar file
>
> Geoff Hall wrote:
> > Our helpset file (fxpeHelp.hs) is in a jar file (fxpeHelp.jar).
> > At the start of our application we find the URL of the helpset file by
> > ClassLoader.getSystemClassLoader().getResource("fxpeHelp.hs");
> > which returns the URL (as seen in the "path" field) of
> > file:/C:/whittle/FX340/programs/jars/fxpeHelp.jar!/fxpeHelp.hs
> >
> > When this URL is used in the statment
> > helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
> > the statement fails with the error
> > javax.help.HelpSetException: Could not parse
> > Got an IOException
> (C:\whittle\FX340\programs\jars\fxpeHelp.jar!\fxpeHelp.hs
> > (The system cannot find the path specified))
> > Parsing failed for null
> >
> > The confusing part is that this code has been working for the past few
> years.
> > This recent problem appears to have started because I upgraded to
> jdk/jre
> > 1.5.0_06 from 1.4.2_04 and JavaHelp 2.0_02 from 1.1.2_01. I've had the
> same
> > problem now with 1.4.2_04, so perhaps the JVM itself might be off the
> hook.
> >
> > The URL path is not what I expect to see from my playing around with
> browsers
> > etc, but it is what is returned from the
> > ClassLoader.getSystemClassLoader().getResource(...) method, so I assume
> it's
> > alright.
> >
> > If I use a directory searchpath rather than the jar file (which we do in
> the
> > development environment) the fxpeHelp.hs file is found and loaded
> without any
> > problems. It's only having the problem when coming from the jar file.
>
> Try loading the jared helpset with hsviewer. If you can do that then the
> problem is in the programing portion. If you can't then we've got on
> problem with the jdk.
>
> Also does this work non jarred?
>
> Binky
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.

Roger Brinkley

Geoff Hall wrote:
> I'm making some progress.
> I discovered that I've never being loading the .hs file from the .jar file!
> I had two copies of the help in the build and I deleted the source copy in
> favour of the .jar copy (as you would) which made the trial build version
> fall over.
>
> Binky, you asked several emails ago whether hsviewer could load the helpset
> from the jar file. My answer now is no - from either the command line or
> the hsviewer window. So I've got a dodgy .jar file in as much as hsviewer
> can't find the .hs file. If I load the .hs file from outside the .jar file,
> then the help works correctly, using pages from the .jar file. I can see
> the .hs file in the .jar file (using winzip). Any tips you can give on what
> I need to be looking for would be appreciated!

Is the .hs file in the toplevel of the jar file? If it is then you
should be able to find it with the hsviewer window. Just browser and
select the jar file. The hs file will be auto added.

> During this path of discovery I also discovered that I couldn't get the
> -hsURL switch to work with hsviewer (using the HolidayHistory helpset and
> jar). Neither could I find any working examples in the documentation. Is
> this switch supposed to work? (I'm using Java 1.5.0_06 and JavaHelp
> 2.0_02.)

Try the classpath environment variable

java -jar hsviewer.jar -helpset Idehelp.hs -classpath
c:\jh2.0\demos\hsjar\idehelp.jar

Binky

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

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.

Geoff Hall

I have been remiss in not feeding back the final result: I've got it working
- the problem was a combination of errors (aren't they all?)

First problem is that the raw files were saved along with the jar file.
When I removed that, the new helpset line:
helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
was finally discovered to have always been bogus. With a URL, all I needed
was:
helpSet = new HelpSet(null, url);

Finally, the .hs file in the jar, while it was at the top level, was too far
down the jar file to be found (by hsviewer). When I made sure it was near
the beginning of the jar file it all fell into place.

Thanks for your help.

BTW, I got hsviewer to work with the -classpath option, but -hsURL still
doesn't work - at least not for me, using the holiday demo help. You might
be interested in checking that out... then again, maybe not ;)

Regards,
Geoff

> -----Original Message-----
> From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM]
> On Behalf Of Roger Brinkley
> Sent: Thursday, 4 May 2006 2:30 AM
> To: JAVAHELP-INTEREST@JAVA.SUN.COM
> Subject: Re: [JAVAHELP] Locating a helpset in a jar file
>
> Geoff Hall wrote:
> > I'm making some progress.
> > I discovered that I've never being loading the .hs file from the .jar
> file!
> > I had two copies of the help in the build and I deleted the source copy
> in
> > favour of the .jar copy (as you would) which made the trial build
> version
> > fall over.
> >
> > Binky, you asked several emails ago whether hsviewer could load the
> helpset
> > from the jar file. My answer now is no - from either the command line
> or
> > the hsviewer window. So I've got a dodgy .jar file in as much as
> hsviewer
> > can't find the .hs file. If I load the .hs file from outside the .jar
> file,
> > then the help works correctly, using pages from the .jar file. I can
> see
> > the .hs file in the .jar file (using winzip). Any tips you can give on
> what
> > I need to be looking for would be appreciated!
>
> Is the .hs file in the toplevel of the jar file? If it is then you
> should be able to find it with the hsviewer window. Just browser and
> select the jar file. The hs file will be auto added.
>
> > During this path of discovery I also discovered that I couldn't get the
> > -hsURL switch to work with hsviewer (using the HolidayHistory helpset
> and
> > jar). Neither could I find any working examples in the documentation.
> Is
> > this switch supposed to work? (I'm using Java 1.5.0_06 and JavaHelp
> > 2.0_02.)
>
> Try the classpath environment variable
>
> java -jar hsviewer.jar -helpset Idehelp.hs -classpath
> c:\jh2.0\demos\hsjar\idehelp.jar
>
> Binky
>
> **************************************************************************
> ******
>
> 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.

vvia
Offline
Joined: 2003-09-07

Here's a solution to get Java Help to work for each of the following:

1: running from class in directory
2: running from a jar
3: running from jnlp using java web start

Basically, it is trying a few different ways to get a valid URL.

URL url = HelpSet.findHelpSet(null, "com/vetbp/help/help.hs");
if (url == null) {
url = getClass().getResource("/com/vetbp/help/help.hs");
if (url == null) {
url = new URL("jar:file:vetbp.jar!/com/vetbp/help/help.hs");
}
}
mainHS = new HelpSet(null, url);

Roger Brinkley

Szigeti, Kal wrote:

> Szigeti, Kal wrote:
> > Hi-
> > I've created a Java Help helpset using WWP. I can successfully view
> > the help set in the help viewer when the files are on my local machine.
> > However, when I upload the files to our web server, then specify the
> > HelpSet URL, I get a "helpset not found" error.
> >
> > Anyone know why I would be able to view the helpset locally but not on
> > the webserver? (I can also see the .hs file when I key in the URL in my
> > browser).
> >
>
> Are you using https?
>

Humm...So what do you mean by putting it on the server. Is it just the
helpset files. How are you accessing the helpset. Which tool? Java
client javahelp or web-based javahelp?

Binky

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

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.

Geoff Hall

Our helpset file (fxpeHelp.hs) is in a jar file (fxpeHelp.jar).
At the start of our application we find the URL of the helpset file by
ClassLoader.getSystemClassLoader().getResource("fxpeHelp.hs");
which returns the URL (as seen in the "path" field) of
file:/C:/whittle/FX340/programs/jars/fxpeHelp.jar!/fxpeHelp.hs

When this URL is used in the statment
helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
the statement fails with the error
javax.help.HelpSetException: Could not parse
Got an IOException (C:\whittle\FX340\programs\jars\fxpeHelp.jar!\fxpeHelp.hs
(The system cannot find the path specified))
Parsing failed for null

The confusing part is that this code has been working for the past few years.
This recent problem appears to have started because I upgraded to jdk/jre
1.5.0_06 from 1.4.2_04 and JavaHelp 2.0_02 from 1.1.2_01. I've had the same
problem now with 1.4.2_04, so perhaps the JVM itself might be off the hook.

The URL path is not what I expect to see from my playing around with browsers
etc, but it is what is returned from the
ClassLoader.getSystemClassLoader().getResource(...) method, so I assume it's
alright.

If I use a directory searchpath rather than the jar file (which we do in the
development environment) the fxpeHelp.hs file is found and loaded without any
problems. It's only having the problem when coming from the jar file.

Regards,

Geoff Hall
Gemcom

-----Original Message-----
From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM] On
Behalf Of Roger Brinkley
Sent: 22 April 2006 01:57
To: JAVAHELP-INTEREST@JAVA.SUN.COM
Subject: Re: [JAVAHELP] problem attempting to view helpset located on a we b
server

Szigeti, Kal wrote:

> Szigeti, Kal wrote:
> > Hi-
> > I've created a Java Help helpset using WWP. I can successfully view
> > the help set in the help viewer when the files are on my local machine.
> > However, when I upload the files to our web server, then specify the
> > HelpSet URL, I get a "helpset not found" error.
> >
> > Anyone know why I would be able to view the helpset locally but not on
> > the webserver? (I can also see the .hs file when I key in the URL in my
> > browser).
> >
>
> Are you using https?
>

Humm...So what do you mean by putting it on the server. Is it just the
helpset
files. How are you accessing the helpset. Which tool? Java
client javahelp or web-based javahelp?

Binky

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

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.

Geoff Hall

I'm sorry, our JavaHelp was upgraded to 2.0_02 from 2.0 (possibly n_01).

Geoff

-----Original Message-----
From: Geoff Hall [mailto:geoffh@gemcomsoftware.com]
Sent: 24 April 2006 16:10
To: 'Discussion list of JavaHelp'
Subject: Locating a helpset in a jar file

Our helpset file (fxpeHelp.hs) is in a jar file (fxpeHelp.jar).
At the start of our application we find the URL of the helpset file by
ClassLoader.getSystemClassLoader().getResource("fxpeHelp.hs");
which returns the URL (as seen in the "path" field) of
file:/C:/whittle/FX340/programs/jars/fxpeHelp.jar!/fxpeHelp.hs

When this URL is used in the statment
helpSet = new HelpSet(ClassLoader.getSystemClassLoader(), url);
the statement fails with the error
javax.help.HelpSetException: Could not parse
Got an IOException (C:\whittle\FX340\programs\jars\fxpeHelp.jar!\fxpeHelp.hs
(The system cannot find the path specified))
Parsing failed for null

The confusing part is that this code has been working for the past few years.
This recent problem appears to have started because I upgraded to jdk/jre
1.5.0_06 from 1.4.2_04 and JavaHelp 2.0_02 from 1.1.2_01. I've had the same
problem now with 1.4.2_04, so perhaps the JVM itself might be off the hook.

The URL path is not what I expect to see from my playing around with browsers
etc, but it is what is returned from the
ClassLoader.getSystemClassLoader().getResource(...) method, so I assume it's
alright.

If I use a directory searchpath rather than the jar file (which we do in the
development environment) the fxpeHelp.hs file is found and loaded without any
problems. It's only having the problem when coming from the jar file.

Regards,

Geoff Hall
Gemcom

-----Original Message-----
From: Discussion list of JavaHelp [mailto:JAVAHELP-INTEREST@JAVA.SUN.COM] On
Behalf Of Roger Brinkley
Sent: 22 April 2006 01:57
To: JAVAHELP-INTEREST@JAVA.SUN.COM
Subject: Re: [JAVAHELP] problem attempting to view helpset located on a we b
server

Szigeti, Kal wrote:

> Szigeti, Kal wrote:
> > Hi-
> > I've created a Java Help helpset using WWP. I can successfully view
> > the help set in the help viewer when the files are on my local machine.
> > However, when I upload the files to our web server, then specify the
> > HelpSet URL, I get a "helpset not found" error.
> >
> > Anyone know why I would be able to view the helpset locally but not on
> > the webserver? (I can also see the .hs file when I key in the URL in my
> > browser).
> >
>
> Are you using https?
>

Humm...So what do you mean by putting it on the server. Is it just the
helpset
files. How are you accessing the helpset. Which tool? Java
client javahelp or web-based javahelp?

Binky

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

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.