I'm have an application which run from command line. As one of it's parameters it have a date from which application should start to process some data. Date can have two different formats yyyy-MM-dd
and yyyy-MM-dd HH:mm:ss
. But when I run application with date in second format (for example 2012-04-18 15:05:08)it use space between -dd and HH as parameter delimiter. And I get exception
No argument is allowed: 15:05:08
I can wrap a date in quotes in command line. But is there other way to do so, without wrapping it?
For parsing command line arguments I'm using org.kohsuke.args4j
library.
Any suggestions?