Search code examples
dynamicmergerelative-urljavahelp

Javahelp relative URL between master helpset and subhelpsets


I am using Javahelp and dynamically merging multiple helpsets. Does anyone know what the relative URL would be if I want to create a link from a page in a subhelpset to a page in the master helpset?


Solution

  • I found the answer to my question and I'll post it here in case someone else has the same problem. In my case, the master helpset was in a jar file and the subhelpset I was dynamically adding was in a separate jar file. I thought that dynamically merging them would somehow move them both into the same location and I could use relative paths to link from one to the other. Not sure why I thought that, but I did. In reality they both stay exactly where they are. The URL for the page in the subhelpset that I was linking from was:

    jar:file:/C:/Program%20Files/SoundProc/plugins/TestPlugin.jar!/TestPlugin/TestPluginHelpPage2.html
    

    The URL for the page in the master help set I was trying to link to was:

    jar:file:/C:/Program%20Files/SoundProc/SoundProc_1_15_05.jar!/help/sound_processing/FiltersHelp/Docs/Filters_filters.html
    

    So instead of trying to use relative paths, I simply use the full URL. For the link on the TestPlugin page I give the path information inside the master jar file, without a reference to the jar file itself. When the program runs and I click on the link, the code reads the location of the jar file containing the master helpset and just adds that to the front of the path given in the link.