set ECLIPSE_HOME=C:\Program Files\eclipse set JAVA_HOME=C:\Program Files\Java\jdk1. 7.0_75 start "eclipse" "%ECLIPSE_HOME%\eclipse.exe" -vm "%JAVA_HOME%\bin\javaw.exe" -data . Two path variables need to be set to reflect your current environment. To start Eclipse, run the batch file eclipse.
To run a batch file, move to the directory containing the file and type the name of the batch file. For example, if the batch file is named "hope. bat," you'd type "hope" to execute the batch file.
Runtime; Process run = Runtime. getRuntime(). exec("cmd.exe", "/c", "Start", "path of the bat file"); This will work for you and is easy to use.
You can call your .bat file using the External Tools feature (in the Run menu).
Example:
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
You can also run a batch file (or any other executable file) by opening it with the System Editor. Use Open With -> System Editor
.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With