Monday, March 11, 2002 06:41 PM
i believe the answer in still in using the runtime.exec call. However, you have to try with a fully qualified command line, including the "winhelp.exe" part, and not just "abc.hlp". The reason is that the association between a file extension and an executable is implemented inside the shell layer (shell32.dll), and not inside the CreateProcess API. The runtime.exec function uses the process api directly instead of calling the shell layer.
alternatively, you could also write you own JNI wrapper around the shell32 API.
i think the first method is a tad simpler... ;-)