🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1787

Re: Variable Helpset not found

#1787
From: John McGrath [TeamB]
Date: Tue, 22 Jul 2003 21:53
40 lines
2668 bytes
On 7/22/2003 at 1:50:06 PM, Craig Wilson wrote:

> I created a jar file with the hs file at the root and the other files
> in their subdirectories, and was able to display normally using
> jhviewer.  I tried putting myHelp.jar in c:\, in the project folder
> (where other resources are being found successfully), in the
> projectfolder\classes folder, and in the project\classes\myproject
> folder (where the *.class files are found).  I have
> 
> URL hsURL = HelpSet.findHelpSet(cLoader, "/myHelpSet.hs");
> 
> where cLoader is either null or obtained from
> 
> ClassLoader cLoader = this.getClass().getClassLoader();
> 
> and it still isn't finding it.

If you want to use the ClassLoader from the current class (which is, I
believe, the same as specifying null), you have to make sure that the
JAR file that has the HelpSet is on your class path.

To do that, you can just create a JBuilder library for it and add the
library to your project.  As I recall, there was one version of
JBuilder that would balk at having a JAR file with no classes in it,
but I think that has been fixed.

The other option would be to create a ClassLoader for the HelpSet and
pass that to findHelpSet().  Something like this should work:

    File file = new File( "Help.jar" );
    URLClassLoader cLoader = new URLClassLoader(
       new URL[] { file.toURL() };
    URL hsURL = HelpSet.findHelpSet( cLoader, "/myHelpSet.hs" );

This is off the top of my head, but I think it should work.

-- 
Regards,

John McGrath  [TeamB]
Technical Details
Message-ID: <3f1db26a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f183ef6@newsgroups.borland.com> <3f18481c$1@newsgroups.borland.com> <3f19799f@newsgroups.borland.com> <3f1b881f@newsgroups.borland.com> <3f1d78ec@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f68d59cce603b54f
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-07-22 15:09:49 PST
From: "John McGrath  [TeamB]" <ng-b@jpmcgrath.net>
Subject: Re: Variable Helpset not found
Newsgroups: borland.public.jbuilder.java.swing
References: <3f183ef6@newsgroups.borland.com> <3f18481c$1@newsgroups.borland.com> <3f19799f@newsgroups.borland.com> <3f1b881f@newsgroups.borland.com> <3f1d78ec@newsgroups.borland.com>
User-Agent: XanaNews/1.15.3.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 151.197.210.86
Message-ID: <3f1db26a@newsgroups.borland.com>
Date: 22 Jul 2003 14:53:46 -0700
X-Trace: newsgroups.borland.com 1058910826 151.197.210.86 (22 Jul 2003 14:53:46 -0700)
Lines: 40
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail