0

In configuring the spring batch jobs, I have a need to pass argument to CommandLineJobRunner which have spaces.

For example :

java -cp "../../myproject.jar" org.springframework.batch.core.launch.support.CommandLineJobRunner jobconf.xml readJob -comp.name=My Company

When executing the above Job, Spring Batch is getting the comp.name value as "My" only.

How to get the full name("My Company") including the spaces?

Any suggestions will be of great help!

Thank you.

Vignesh
  • 364
  • 2
  • 11
  • 19

1 Answers1

0

Argument having spaces in it splitted into multiple arguments. Use quotes to specify it as a single argument. May be this can help you

Community
  • 1
  • 1
  • Even if the arg is passed with double quotes "My Company", the Job is not getting the full value. – Vignesh Apr 07 '17 at 11:24