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

My Java application starts when you run the set of commands present in the batch file (.bat file). And I imported it into Workbench Eclipse. How to execute a batch file from Eclipse. Like the command line, I directly pass "path: \ myBatchfile.bat". Is there a way that I can do directly from Eclipse.

+42
eclipse batch-file
Jul 07 '09 at 4:28
source share
4 answers

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




Example:

enter image description here

enter image description here

enter image description here

+65
Jul 07 '09 at 4:39
source share

Or you can create an Ant build file that can invoke external applications.

This will give you the advantage of calling .bat not only from Eclipse, but also from other IDEs or from the command line (on any machine).

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

+12
Jul 07 '09 at 6:15
source share

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

+1
Apr 09 '14 at 10:08
source share

Associate with a text editor with the right mouse button - Open With (Since 2017 there is no plug-in with a special editor)

Run the installation plugin, for example https://marketplace.eclipse.org/content/easyshell
You can easily run .sh with Git Bash

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

+1
Nov 09 '17 at 15:31 on
source share



All Articles