Open chm file in java

拜拜、爱过 提交于 2019-12-12 19:54:00

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!