Results 1 to 20 of 24
Thread: helpset findHelpSet returns null
- 06-21-2010, 01:45 PM #1
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
- 06-21-2010, 01:58 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
- 06-21-2010, 02:07 PM #3
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
splashscreen problem
i run the app in windows do u mean somethin glike
D:\\kmm1977\\docBook\\jh\\jhelpset.hs ?
- 06-21-2010, 02:09 PM #4
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
splashscreen problem
it still returns null
is someother forum i read somelike this
ClassLoader c1 = this.class.getClassLoader();
URL hsURL = new URL("file:/c:/helpHS");
hs = new HelpSet(c1, hsURL);
- 06-21-2010, 02:59 PM #5
What does the API doc for HelpSet.findHelpSet() say?
What package is HelpSet in?
- 06-21-2010, 03:26 PM #6
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
structure goes like this in eclipse
- mainApp
- src/main
- application.java ( here is my main application )
- JRE System Lib
- Reference Lib
- bin ( here i have my jar files , also jhall.jar )
- docBook
- jh ( here is the jhelpset.hs )
- resources
- src
it is not in any package its in a folder in the application folder
- 06-21-2010, 03:31 PM #7
Can you post the code for the findHelpSet() method?
I have no idea what it does.
- 06-21-2010, 03:36 PM #8
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
its a huge code structure but i can explain
the main application is mainApp which is in package report
the manager class ( with main ) here is where the
myHSUrl = HelpSet.findHelpSet(null, pHelpSet); is called in the constructor
this is another package called onlineservice
from my main application i call the Manager constructor
myManager = new Manager("docBook/jh/jhelpset.jh",myScreen);
- 06-21-2010, 03:38 PM #9
Where in the method does it decide to return null?
Look there.
- 06-21-2010, 05:02 PM #10
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
yes i looked there
but it returns only null
the helpset files are not bundles as jar but are in folder
docBook/jh/jhelpset.hs
...
so i add this path to my classpath in eclipse
and i call this helpfile from my main app
HelpSet.findHelpSet(null, "docBook/jh/jhelpset.hs");
i also tried all types of path combination , it adamant not to work :confused:
- 06-21-2010, 05:07 PM #11
Are you saying that the findHelpSet method is this:but it returns only null
Hard to believe! There must be more to it than thatJava Code:public ... findHelpSet( ...) { return null; // this is only line of code in this method }
- 06-21-2010, 05:14 PM #12
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
yes there is more lines which follow
URL myURL = HelpSet.findHelpSet(null, "docBook/jh/jhelpset.hs");
but since here i get null as return values , it crashes
,
what is basically required for implementing a java help system ?
may be i m missing some packages !!
- 06-21-2010, 05:17 PM #13
Your are missing my point.
Why does the method: findHelpSet() return null?
That's what you want to fix, isn't it?
- 06-21-2010, 05:25 PM #14
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
yes
i dont understand why findHelpSet returns null
although there exists jhelpset.hs file
- 06-21-2010, 05:29 PM #15
We're sort of getting in a loop here.
Do you have the source code for findHelpSet? Can you look at it to see why it would return a null?
Or do you have doc for findHelpSet. Does it say why it will return a null?
- 06-21-2010, 05:39 PM #16
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
oh sorry for the misunderstanding
findHelpSet is not implemented by me
please see the reference below
URL javax.help.HelpSet.findHelpSet(ClassLoader arg0, String arg1)
- 06-21-2010, 05:40 PM #17
What did you find in the doc?
Here's a short program that may help you find the correct path to the file. Change filename to your path and put the program in the folder where your programs are. Keep changing filename until the value of url is not null.
Java Code:/* findHelpSet public static java.net.URL findHelpSet(java.lang.ClassLoader cl, java.lang.String name) As above but default on locale to Locale.getDefault() Parameters: cl - The ClassLoader to use. If cl is null the default ClassLoader is used. name - The name of the resource. Returns: Null if not found. */ import java.net.*; public class TestGetResource1 { public static void main(String[] args) { String filename = "../../Testing/ForumQuestions3/TestGetResource.java"; try { URL url = (new TestGetResource1()).getClass().getClassLoader().getResource(filename); System.out.println("FN=" + filename + ", url=" + url); }catch(Exception x) { System.out.println("Error: FN=" + filename + ", error:" + x); } } } /* FN=TestGetResource.java, url=file:/D:/JavaDevelopment/Testing/ForumQuestions3/TestGetResource.java FN=/TestGetResource.java, url=file:/D:/JavaDevelopment/Testing/ForumQuestions3/TestGetResource.java FN=../ForumQuestions3/TestGetResource.java, url=file:/D:/JavaDevelopment/Testing/ForumQuestions3/TestGetResource.java FN=../../Testing/ForumQuestions3/TestGetResource.java, url=file:/D:/JavaDevelopment/Testing/ForumQuestions3/TestGetResource.java FN=../../Testing/XXForumQuestions3/TestGetResource.java, url=null <<<< NB: null when file does not exist */Last edited by Norm; 06-21-2010 at 06:22 PM.
- 06-22-2010, 10:16 AM #18
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
thank you first for the effort you took
that example was great , which helped me understand the problem
what i found that , is that the path is the problem . the application was not finding the files correctly
thats an issue for eclipse to solve
i put all the files in the bin folder of the application and it seems to work
i have to find out to configure the eclipse search path to make the app find the files .
any way thanks for that
- 06-22-2010, 10:41 AM #19
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
- 06-22-2010, 11:33 AM #20
Member
- Join Date
- May 2010
- Posts
- 47
- Rep Power
- 0
helpset problem
ok i ll look into it
I now make a runnable jar , with eclipse and all is fine
only the resource files i.e. png files are not shown in the help system of my application
the png files lie under the subfolder of, the folder structure is as follows
application folder
- src/main
- JRE System Lib
- Reference Lib
- bin ( here i have my jar files , also jhall.jar )
- docBook
- jh ( here is the jhelpset.hs )
- resources
- src
Similar Threads
-
IndexSearch.docfreq returns 0.0
By noir in forum LuceneReplies: 0Last Post: 04-26-2010, 09:32 AM -
Carriage Returns in JTEXTAREA
By AJArmstron@aol.com in forum Advanced JavaReplies: 8Last Post: 04-17-2010, 07:34 PM -
String file and carriage returns
By AJArmstron@aol.com in forum New To JavaReplies: 2Last Post: 04-17-2010, 01:28 AM -
NetworkInterface returns only ports that are up
By dogbert in forum NetworkingReplies: 0Last Post: 10-13-2009, 05:12 PM -
What's the need for co-variant returns ?
By ajeeb in forum New To JavaReplies: 0Last Post: 03-23-2009, 09:56 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks