NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Getting JavaHelp to Work for My Application

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
wagb4



Joined: 17 Feb 2011
Posts: 4

PostPosted: Tue Mar 01, 2011 3:00 am    Post subject: Getting JavaHelp to Work for My Application Reply with quote

I'm developing (on Windows platform) a Java desktop application using NetBeans 6.9.1 and it is close to being done so I made JavaHelp files but cannot seem to figure out how to get the help to show when in my app I click the Help menuItem. My help files work just fine when launched using the JavaHelp "hsviewer.jar".

My logic is a virtual copy of the example from the JavaHelp documentation.

HOW DO I GET NETBEANS TO FIND MY HELP FILES?

My problem is that I get "null" returned from the
Code:

hsURL = HelpSet.findHelpSet(cl, helpsetFile);

statement.

I'm not sure where the files should be placed so they can be found. My research into this resulted in me building a JAR file with my help files as content and adding that JAR to the project Libraries. I tried many alternatives as to where to place the files but nothing works. Neither running the Main Project or a Clean & Build then execute that outside NetBeans works.

Someone must have solved this already. Any suggestions are welcome.

Jim
Back to top
aiyaya_ayang



Joined: 21 Jul 2011
Posts: 1
Location: United States

PostPosted: Thu Jul 21, 2011 5:52 pm    Post subject: Re: Getting JavaHelp to Work for My Application Reply with quote

wagb4 wrote:
I'm developing (on Windows platform) a Java desktop application using NetBeans 6.9.1 and it is close to being done so I made JavaHelp files but cannot seem to figure out how to get the help to show when in my app I click the Help menuItem. My help files work just fine when launched using the JavaHelp "hsviewer.jar".

My logic is a virtual copy of the example from the JavaHelp documentation.

HOW DO I GET NETBEANS TO FIND MY HELP FILES?

My problem is that I get "null" returned from the
Code:

hsURL = HelpSet.findHelpSet(cl, helpsetFile);

statement.

I'm not sure where the files should be placed so they can be found. My research into this resulted in me building a JAR file with my help files as content and adding that JAR to the project Libraries. I tried many alternatives as to where to place the files but nothing works. Neither running the Main Project or a Clean & Build then execute that outside NetBeans works.

Someone must have solved this already. Any suggestions are welcome.

Jim


Hi Jim,

I have the same problem before.
But I didn't solve it totally.
I used the following code to find helpset:
cl = this.getClass().getClassLoader();
hsURL = HelpSet.findHelpSet(cl, helpsetfile);

After this, before I run the app, I just added the helpset files to the directory where cl can find them.
My problem was: when I run the JUnit test, the help content presented, but when I run the whole module project, the help frame is popup without content.

Did you solve the problem?
How did you do?


Thanks.
Jing
Back to top
Brian Ngure
Posted via mailing list.





PostPosted: Fri Jul 22, 2011 7:46 am    Post subject: Getting JavaHelp to Work for My Application Reply with quote

Hi,



This is what I use to load help files. The help files are in a jar file on the classpath. Hope this helps.




/**
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo