Application starts in JAVA_HOME folder when running using the Tomcat plugin

已回答

Application starts in JAVA_HOME folder when running using the Tomcat plugin. Is there a way to specify the base folder for the application?

Here the default startup script:

/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin/java -Dcatalina.base=/Users/***/Library/Caches/IntelliJIdea2016.3/tomcat/bundled_-_run_(without_unit_tests)_(1)_cbms-boot_2 -Dcatalina.home=/Users/***/devroot/apache-tomcat-8.0.35 -Djava.io.tmpdir=/Users/***/devroot/apache-tomcat-8.0.35/temp -Dcom.sun.management.jmxremote= -Dcom.sun.management.jmxremote.port=1199 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=127.0.0.1 -cp /Users/***/devroot/apache-tomcat-8.0.35/bin/bootstrap.jar:/Users/***/devroot/apache-tomcat-8.0.35/bin/tomcat-juli.jar org.apache.catalina.startup.Bootstrap start

OS: OSX

0

It's not a very good idea to make your web app depend on working directory setting.

If it's absolutely required, you can adjust the startup script to change the working directory before starting JVM with Tomcat.

0

请先登录再写评论。