File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes executing java from .bat file with parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "executing java from .bat file with parameters" Watch "executing java from .bat file with parameters" New topic

executing java from .bat file with parameters

James Peter
Ranch Hand

Joined: Sep 15, 2010
Posts: 115
Hi All,

I need to run a java application using a dos batch file. Below is my code. All jar files are being added to the classpath and also able to display then on console. But it is not executing the class
CommandLineJobRunner. i doubt I am using the command in a properway. I am not sure how to specify parameter like ( applicationContext.xml accountsJob). If anyone is having idea how to do it please let me know.

Darryl Burke

Joined: May 03, 2008
Posts: 5115

You specify the parameters according to how the program's entry point -- the public static void main(...) method -- processes them.

luck, db
There are no new questions, but there may be new answers.
I agree. Here's the link:
subject: executing java from .bat file with parameters
It's not a secret anymore!