try without quotes
set JAVA_OPTS=-Dapplication.home=E:\\webapp -Dfilepath=D:\\newFolder\\conf\\con.properties
should work
Answer from Evgeniy Dorofeev on Stack OverflowHmm, deleted the whole file and recreated it, and now it works..... Now using this style
export JAVA_OPTS="$JAVA_OPTS\
-server\
-Xms704m\
-Xmx704m\
-XX:OnOutOfMemoryError=/usr/share/scripts/on_server_crash.sh\
-XX:+HeapDumpOnOutOfMemoryError\
-XX:HeapDumpPath=/var/log/tomcat7\
-XX:MaxPermSize=128m\
-XX:MaxNewSize=256m\
-XX:NewSize=256m\
-XX:SurvivorRatio=12\
-XX:MaxTenuringThreshold=0\
-XX:+UseConcMarkSweepGC\
-XX:+CMSIncrementalMode\
-XX:+CMSIncrementalPacing\
-XX:+CMSClassUnloadingEnabled\
-XX:+CMSPermGenSweepingEnabled\
-XX:+DisableExplicitGC\
-XX:+UseParNewGC\
-XX:+UseTLAB\
-Djava.awt.headless=true\
-javaagent:$NR_JAR\
-Dnewrelic. environment=production"
You'd be better off with:
JAVA_OPTS="$JAVA_OPTS -server "
JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx512m"
export JAVA_OPTS
You can. Simply add multiple arguments each specifying an agents. Agents are activated in the order they are specified on the command line:
java -javaagent:foo.jar=arg1 -javaagent:bar.jar=arg2 ...
JAVA_OPTS or CATALINE_OPTSare only alternative ways of specifing something on the command line.
If you are looking for a combined Jolokia and Prometheus' jmx_exporter you might want to have a look at agent-bond, a super agent which combines multiple agents into one. Currently, only Jolokia and jmx_exporter are supported, but other agents could be easily added.
The advantage of such a combined approach is that you only have to deal with a single agent jar and a bit simpler command line configuration.