2

I want to open a CHM (help) file from my java application... My code looks like this:

Runtime.getRuntime().exec("hh.exe myhelpfile.chm");

It works, but how can I open it with a specific page??

Thanks, Tom

kentcdodds
  • 27,113
  • 32
  • 108
  • 187
Tom
  • 21
  • 1
  • 2

2 Answers2

4

Try this,

Is it possible to open a specific topic from the Hh.exe command line?

http://msdn.microsoft.com/en-us/library/ms669980(VS.85).aspx#is_it_possible_to_open_a_specific_topic_from_the_hh.exe_command_line_

Elist
  • 5,313
  • 3
  • 35
  • 73
Steve-o
  • 12,678
  • 2
  • 41
  • 60
  • 1
    This seems to apply when using the hh execute instruction, nevertheless if you want to use the Desktop class included in Java6, it might not apply :( – will824 Jul 05 '11 at 21:07
0
String s;
    Process p;
    try {
        p = Runtime.getRuntime().exec("chmsee sample.chm");
        BufferedReader br = new BufferedReader(
                new InputStreamReader(p.getInputStream()));
        p.waitFor();
        System.out.println("exit: " + p.exitValue());
        p.destroy();
    } catch (Exception e) {
    }
Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
nugrahaTeten
  • 39
  • 1
  • 7