javahelp

Hi

I am using netbeans to create an application where I would like to call javahelp. I have created the menu item and added an action performed event to load the help as below but nothing happens when I try to load the help. Can anyone help?

<code>

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {

try {

URL url = new URL("file:/c:/help/help.hs"); // replace this with the actual location of your help set

HelpSet hs = new HelpSet(null, url);

HelpBroker hb = hs.createHelpBroker();

new CSH.DisplayHelpFromSource(hb);

}

catch (Exception e) {

e.printStackTrace();

}

</code>

[692 byte] By [mmidea] at [2007-11-27 7:01:05]
# 1
Any exception?file:/c:/help/help.hs is not a valid URL, by the way.
CeciNEstPasUnProgrammeura at 2007-7-12 18:51:54 > top of Java-index,Java Essentials,New To Java...
# 2
No exceptions at all.What would be a valid url?
mmidea at 2007-7-12 18:51:54 > top of Java-index,Java Essentials,New To Java...
# 3
file:///c:/help/help.hs I suppose. If that doesn't throw an exception: are you sure your listener is even called?
CeciNEstPasUnProgrammeura at 2007-7-12 18:51:54 > top of Java-index,Java Essentials,New To Java...
# 4

The following code returns the output 'This is called' but still the javahelp does not load

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {

try {

URL url = new URL("file:///C:/CFX/ClariSim/help/help.hs");

System.out.println("This is called");

HelpSet hs = new HelpSet(null, url);

HelpBroker hb = hs.createHelpBroker();

new CSH.DisplayHelpFromSource(hb);

}

catch (Exception e) {

e.printStackTrace();

}

}

mmidea at 2007-7-12 18:51:54 > top of Java-index,Java Essentials,New To Java...