问题
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
回答1:
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_
回答2:
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) {
}
来源:https://stackoverflow.com/questions/3509437/open-chm-file-in-java