Forum Stats

  • 3,827,131 Users
  • 2,260,743 Discussions
  • 7,897,181 Comments

Discussions

Empty contents when using JAR for html content

When I DON'Tt use a JAR file for my html content and run the help_demo application to display the help, I see my TOC and my help content in the window. However, if I creata a JAR of my html content, the TOC is displayed but the content window remains blank. Interestingly, the search does find topics, but again, they don't display in the content window.

Has anyone had this problem?


Below is the batch file I use to run things:

hs.bat
------
"C:\j2sdk1.4.0_01\jre\bin\java.exe" "-Dinstall.root=C:\ohelp" -classpath "C:\ohelp\help-demo-4_1_12.jar;C:\ohelp\help-4_1_12.jar;C:\ohelp\ohj-jewt-4_1_12.jar;C:\ohelp\oracle_ice-5_06_8.jar;C:\ohelp\swingall.jar;c:\path_to_my_jarfile\my_jarfile.jar;." oracle.help.demo.ChoiceDemo %1 %2

Comments

  • 89524
    89524 Member Posts: 13
    It might be that when using a JAR'ed helpset, depending on how you have organized the JAR file, a security exception may generate while trying to load helpset (to avoid this make sure that the helpset is in the parent directory of the content).

    We suggest that if you are using JDK 1.2.2 or later, the utilize the 'jar:' protocol. Pass this URL to the HelpSet class constructor. For example of that URL:

    jar:file://c:/path_to_my_jarfile/my_jarfile.jar!/myhelpset.hs

    If you are using OHJ 4.1.12 or later, then you can also hand this URL to the ChoiceDemo.

    If you have a stack or exception trace, we might be able to give you more insight to the exact cause of your problem.

    Cheers,

    OH Team
  • 322339
    322339 Member Posts: 5
    I was able to read the jar file but needed to resort to the following ( this is on Windows 2000):

    jar:file:myproject.jar!/myproject.hs
    OR
    jar:file:C:\my_jar_directory\myproject.jar!/myproject.hs
    OR
    jar:file://\\mymachine\c_drive\my_jar_directory\myproject.jar!/myproject.hs

    But NOT:

    jar:file://C:\my_jar_directory\myproject.jar!/myproject.hs

    It appears that "//" are only ment for a UNC path.

    With that out of the way, I've been able to get things working.

    One observation I have is that things seem to get into a "busy" loop on occasion more than I'd like. What I mean is that if I move a window over the help window and remove it, it refreshes sometimes quickly, and othertimes, it takes quite a while. I suspect that this is a "Swing" issue. I also have noticed that while running, it takes a lot of CPU resources. Again, I suspect this is "Swing". My question is are these performance issues normal (and accepted?) or are there ways to overcome them.



  • Hi Paul,

    The CPU usage of the help system is generally pretty insignificant
    once the system is initialized (once the meta-data files are loaded).
    JDK 1.4 has introduced a bug that for certain window sizes churns
    the CPU quite a bit (doing what I don't know yet). Oracle has
    encountered this problem with a few of our products (including
    OHJ) when testing with JDK 1.4.

    We are working these kinks out, and hopefully will be able to
    release a version of OHJ that officially supports JDK 1.4 soon.
This discussion has been closed.