<small id='3eJCx'></small><noframes id='3eJCx'>

<tfoot id='3eJCx'></tfoot>
    <bdo id='3eJCx'></bdo><ul id='3eJCx'></ul>

      <i id='3eJCx'><tr id='3eJCx'><dt id='3eJCx'><q id='3eJCx'><span id='3eJCx'><b id='3eJCx'><form id='3eJCx'><ins id='3eJCx'></ins><ul id='3eJCx'></ul><sub id='3eJCx'></sub></form><legend id='3eJCx'></legend><bdo id='3eJCx'><pre id='3eJCx'><center id='3eJCx'></center></pre></bdo></b><th id='3eJCx'></th></span></q></dt></tr></i><div id='3eJCx'><tfoot id='3eJCx'></tfoot><dl id='3eJCx'><fieldset id='3eJCx'></fieldset></dl></div>
      1. <legend id='3eJCx'><style id='3eJCx'><dir id='3eJCx'><q id='3eJCx'></q></dir></style></legend>

        从 Eclipse 插件项目运行 program.exe

        时间:2023-08-20
      2. <i id='Yyets'><tr id='Yyets'><dt id='Yyets'><q id='Yyets'><span id='Yyets'><b id='Yyets'><form id='Yyets'><ins id='Yyets'></ins><ul id='Yyets'></ul><sub id='Yyets'></sub></form><legend id='Yyets'></legend><bdo id='Yyets'><pre id='Yyets'><center id='Yyets'></center></pre></bdo></b><th id='Yyets'></th></span></q></dt></tr></i><div id='Yyets'><tfoot id='Yyets'></tfoot><dl id='Yyets'><fieldset id='Yyets'></fieldset></dl></div>
          <bdo id='Yyets'></bdo><ul id='Yyets'></ul>

              <tfoot id='Yyets'></tfoot>
            • <legend id='Yyets'><style id='Yyets'><dir id='Yyets'><q id='Yyets'></q></dir></style></legend>
                <tbody id='Yyets'></tbody>

              <small id='Yyets'></small><noframes id='Yyets'>

                  本文介绍了从 Eclipse 插件项目运行 program.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在编写一个运行 program.exe 的 eclipse 插件.我已将 program.exe 添加到插件 jar 文件中.如何执行这个程序?

                  I am writing an eclipse-plugin witch run program.exe. I have added program.exe to plugin jar file. How can a execute this program?

                  public class Handler extends AbstractHandler {
                      public Object execute(ExecutionEvent event) throws ExecutionException {
                          Runtime.getRuntime().exec(/*What should I write here*/);
                          return null;
                      }
                  }
                  

                  推荐答案

                  无法从插件jar中运行program.exe,需要解压.在您的插件中使用:

                  You can't run the program.exe from inside the plugin jar, so it needs to be extracted. In your plugin use:

                  Bundle bundle = Platform.getBundle("plugin id");
                  
                  URL url = FileLocator.find(bundle, new Path("relative path to program"), null);
                  
                  url = FileLocator.toFileURL(url);
                  

                  这将在插件 jar 中找到程序并将其解压缩到一个临时位置(由 FileLocator.toFileURL 完成).

                  This will find the program in the plugin jar and extract it to a temporary location (done by FileLocator.toFileURL).

                  这篇关于从 Eclipse 插件项目运行 program.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:包括 Eclipse 中的 sencha touch 2 下一篇:跨计算机共享 Eclipse 工作区?

                  相关文章

                    <bdo id='tTt97'></bdo><ul id='tTt97'></ul>
                1. <tfoot id='tTt97'></tfoot>
                  <legend id='tTt97'><style id='tTt97'><dir id='tTt97'><q id='tTt97'></q></dir></style></legend>

                      <i id='tTt97'><tr id='tTt97'><dt id='tTt97'><q id='tTt97'><span id='tTt97'><b id='tTt97'><form id='tTt97'><ins id='tTt97'></ins><ul id='tTt97'></ul><sub id='tTt97'></sub></form><legend id='tTt97'></legend><bdo id='tTt97'><pre id='tTt97'><center id='tTt97'></center></pre></bdo></b><th id='tTt97'></th></span></q></dt></tr></i><div id='tTt97'><tfoot id='tTt97'></tfoot><dl id='tTt97'><fieldset id='tTt97'></fieldset></dl></div>
                    1. <small id='tTt97'></small><noframes id='tTt97'>