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.

One Reply to “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.