954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how arguments are to be passed from a run.bat file

SET CLASSPATH_JARS=../../lib/log4j/log4j-1.2.14.jar

SET BUILD_CLASS_DIR_IMPLEMENTATION=BUILD_LOCAL\implementation\build\classes

SET RUN_CLASSPATH=%BUILD_CLASS_DIR_IMPLEMENTATION%;%CLASSPATH_JARS%
SET CLASS_TO_RUN=chepsoft.micro.javadoc.workerapplication.WorkerApplication

SET ARGUMENTS=Worker implementation by WorkerImpl

ECHO CLASSPATH_JARS=%CLASSPATH_JARS%

ECHO BUILD_CLASS_DIR_IMPLEMENTATION=%BUILD_CLASS_DIR_IMPLEMENTATION%

ECHO RUN_CLASSPATH=%RUN_CLASSPATH%

ECHO CLASS_TO_RUN=%CLASS_TO_RUN%

java -classpath %RUN_CLASSPATH% %CLASS_TO_RUN% %ARGUMENTS%
%1String name = "Bethuel", %2String workerType = "Monthly Employee", %3double salary = 22000d,

if i want to pass the above variables from run.bat file instead of main() method where should insert them in my code of bat file.

betny
Newbie Poster
20 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 
SET CLASSPATH_JARS=../../lib/log4j/log4j-1.2.14.jar

SET BUILD_CLASS_DIR_IMPLEMENTATION=BUILD_LOCAL\implementation\build\classes

SET RUN_CLASSPATH=%BUILD_CLASS_DIR_IMPLEMENTATION%;%CLASSPATH_JARS%
SET CLASS_TO_RUN=chepsoft.micro.javadoc.workerapplication.WorkerApplication

SET ARGUMENTS=Worker implementation by WorkerImpl

ECHO CLASSPATH_JARS=%CLASSPATH_JARS%

ECHO BUILD_CLASS_DIR_IMPLEMENTATION=%BUILD_CLASS_DIR_IMPLEMENTATION%

ECHO RUN_CLASSPATH=%RUN_CLASSPATH%

ECHO CLASS_TO_RUN=%CLASS_TO_RUN%

java -classpath %RUN_CLASSPATH% %CLASS_TO_RUN% %ARGUMENTS%
%1String name = "Bethuel", %2String workerType = "Monthly Employee", %3double salary = 22000d,

if i want to pass the above variables from run.bat file instead of main() method where should insert them in my code of bat file.


why did you create a duplicate thread? if people are going to answer, they can do this in the original thread.

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 

Duplicate thread closed please follow discussion here

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: