aspose file tools
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

Win a copy of Head First Android this week in the Android forum!
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: 4947

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
jQuery in Action, 3rd edition