<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

        Run program.exe from eclipse plugin project(从 Eclipse 插件项目运行 program.exe)
      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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)
                    <bdo id='tTt97'></bdo><ul id='tTt97'></ul>
                  • <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>
                        • <small id='tTt97'></small><noframes id='tTt97'>

                            <tbody id='tTt97'></tbody>