• Uncategorized

About java : Passing-JVM-parameter-having-space-charater-in-a-File

Question Detail

I am having an error "Error: Could not find or load main class %l"", when running run.sh script, I have a work around solution that replacing space char between "%h %l" with other one such as “%h-%l”.

interesting part is that when I run the exact path (COMMAND_PATH) on command line everything is fine.
It seems that passing a JVM parameter having space character in a file cause a problem.

Do you have any solution and advice for this one?

JVM parameter stored in app.jvm.properties file

-Dserver.tomcat.access-log-pattern=”%h %l”

---run.sh---

JVM_OPTIONS=`tr '\n' ' ' < ${APP_HOME}/bin/app.jvm.properties`
COMMAND_PATH="${JAVA_HOME}/bin/java ${JVM_OPTIONS} -jar APP.jar" 
${JAVA_HOME}/bin/java ${JVM_OPTIONS} -jar APP.jar

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.