开发者

How to specify Java Option (System Property) for embedded Tomcat while running Grails App?

开发者 https://www.devze.com 2022-12-24 22:51 出处:网络
Specifically, I want to have my grails app under development to connect to an Oracle db defined by an tnsnames.ora file. I have the tnsnames.ora file located in c:\\drivers\\Network\\ on my PC. When I

Specifically, I want to have my grails app under development to connect to an Oracle db defined by an tnsnames.ora file. I have the tnsnames.ora file located in c:\drivers\Network\ on my PC. When I run开发者_如何学JAVA the grails app via "grails run-war", the db connection string defined in the tnsnames.ora file doesn't seem to be picked up:

grails prod run-war -Dserver.port=62215 -Doracle.net.tns_admin=C:\drivers\Network\

It seems the name-value pair of oracle.net.tns_admin is not being passed to the JVM used by the the embedded Tomcat that comes with Grails 1.2.0. If not, what is the proper way of specifying it, or pass any JAVA_OPTS to the underlying JVM?


You're best off setting your JAVA_OPTS in the Grails startup script (%GRAILS_HOME%/bin/grails.bat). See this link for an example.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号