I know this is not exactly where i should post this question , but it seems
like this is where I learned a lot of things concerning Java topics
(although I haven't use my Linux box for a while), I hope you-experienced
java programmers- might help me out with this.
I'm trying to implement a Help System system using JavaHelp EA provided by
Sun.I have jdk1.1.6 installed on my PC . I try to write very simple script
followed code fragment and demos from Sun docs; however, i keep getting
NullPointerException when trying to set a HelpSet from URL . I'm pretty sure
that the way I setup my help docs is correct since I can use hsviewer to
bring up this helpset file and its sub files . Here some of my code and
where it gets choked.
public class iscsbJPanel extends com.sun.java.swing.JPanel implements
java.awt.event.ActionListener
{
HelpSet mainHS;
HelpBroker mainHB;
static final String helpsetName = "tram";
public iscsbJPanel()
{
super();
try {
ClassLoader cl = iscsbJPanel.class.getClassLoader();
URL url = HelpSet.findHelpSet(cl, helpsetName);
System.out.println("URL : " + url.toString());
mainHS = new HelpSet(cl,url);
} catch (Exception ee) {
System.out.println ("Help Set "+helpsetName+" not found : "
+ ee.toString());
ee.printStackTrace();
return;
}
}
Output :
URL : systemresource:/ZIP3/+/tram.hs
Help Set tram not found : java.lang.NullPointerException
java.lang.NullPointerException
at javax.javahelp.HelpSet.<init>(HelpSet.java:76)
at iscsbJPanel.<init>(iscsbJPanel.java:32)
at iscsbHelp.<init>(iscsbHelp.java:36)
at iscsbHelp.main(iscsbHelp.java:55)
Could someone please tell me what I need to do to just load a simple HelpSet
or some sample working code ?
Tram Nguyen N.
Science Application International Corporation
http://www.saic.com
(619) 646-3357