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
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: 13875
    
  10

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a batch file for a java program?
 
Similar Threads
ArrayIndexOutOfBoundsException
how to create batch file for java program in eclipse
calling batch files
java program that can run a .class file in msdos, is this possible?
help regarding batch file