How to run a batch script (.bat file) from eclipse

后端 未结 4 1438
天命终不由人
天命终不由人 2020-12-01 11:54

My Java application is started by running a set of commands that are present in a batch file (.bat file). And I imported this into Eclipse workbench. How do I execute the ba

相关标签:
4条回答
  • 2020-12-01 12:19

    Or, you could create an Ant build file, which can call external applications.

    This will give you the advantage to call the .bat not only from Eclipse, but other IDE's, or from command line (on any machine).

    http://ant.apache.org/manual/Tasks/exec.html

    0 讨论(0)
  • 2020-12-01 12:25

    You can also run a batch file (or any other executable file) by opening it with the System Editor. Use Open With -> System Editor.

    0 讨论(0)
  • 2020-12-01 12:27

    Associate with text Editor by right-click - Open With (As of 2017 there is no plugin with special editor )

    To run install plugin like https://marketplace.eclipse.org/content/easyshell
    You can easy run .sh with Git Bash as well

    or https://github.com/culmat/eExplorer

    0 讨论(0)
  • 2020-12-01 12:40

    You can call your .bat file using the External Tools feature (in the Run menu).


    Example:

    enter image description here

    enter image description here

    enter image description here

    0 讨论(0)
提交回复
热议问题