I expect my program run as such when run a start up script:
/opt/bin/java -Dgroup.profile=GROUP_270731 -Dother=other xxx.xxx.MainClass
while my script is like
#!/bin/shell
JAVA_OPTS=getOpts
${JAVA_HOME}/bin/java $JAVA_OPTS $OTHER_ARGS xxx.xxx.MainClass
getOpts(){
# get java opts from certain file java_opts
}
All that I could change is just the java opts file, in which I have to fetch a group info in a certain file, I did this in my java opts:
-Dgroup.profile=$(cat /home/admin/conf/deploy.conf | sed 's|[[:blank:]]||g' | grep group.profile= | cut -d= -f2)) -Dother.args
However, I got such err log:
cannot find or load main class .home.admin.conf.deploy.conf
It seems something went run in my java_opts cmd.