aspose file tools*
The moose likes Beginning Java and the fly likes How to create a batch file for a java program? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to create a batch file for a java program?" Watch "How to create a batch file for a java program?" New topic
Author

How to create a batch file for a java program?

Ong CherYee
Greenhorn

Joined: Jan 17, 2008
Posts: 11
I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.

I would want to create a batch file (.bat) for this project where the batch file can automatically use the arguments set in JCreator when the program runs.

How do I go about creating the batch file?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14420
    
  23

A Windows batch file is simply a text file with commands. You can create it with any text editor (for example, Notepad if you don't have anything better). Create a new file with the extension .bat and put commands in it that you want to execute when the batch file is run.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a batch file for a java program?