Create Batch file using Java

In this post, I will show you how to create batch file and execute it using Java.


The following configurations are required in order to run the application

JDK 1.8

Now create a Java project called “java-core” in Eclipse.

Then create a package called “com.roytuts.batch” in the Java project.

Now create a class called “BatchFile” with the below source code

Now run the above class, you will see one command prompt opens with echoing all commands.

Thanks for reading.


Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

One thought on “Create Batch file using Java

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.