File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 14114
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
 
Consider Paul's rocket mass heater.
 
subject: How to create a batch file for a java program?