I am trying to set java_opts having values with spaces in catalina.sh. I am trying this in unix. Can, somebody tell how we set java_opts with spaces in catalina.sh. I tried below and it doesn't work.
JAVA_OPTS="$JAVA_OPTS "-DargumentA=0 0 12 * * ?""
The best way to set Java/JVM options is to create a bin/setenv.sh or bin\setenv.bat file (depending on which OS you're using) and put the statement in that file. That way you don't have to modify the factory-supplied scripts.
You should, I believe, actually be able to simple make the setenv.sh contents look like this:
I don't believe that Tomcat has any existing JAVA_OPTS values to worry about.
However, I should caution you that it is NOT a good idea to pass configuration information into webapps via the JVM environment.
From the looks of it, you are attempting to set a cron-style schedule (probably for Quartz Scheduler) and make it externally customizable. I'd recommend doing this with an Environment sub-element in the webapp's Context definition. It's what I always do.
Customer surveys are for companies who didn't pay proper attention to begin with.