Setting User Environment Variables for tomcat on Windows

[亡魂溺海] 提交于 2019-12-01 09:01:05

Had the same problem and I've just managed to solve it.

From an admin command prompt do the following command:

tomcat8 //US//YourServiceName ++Environment varname=value

You can set more than one variable by separating them with a semicolon (;) or a hash (#). The documentation is quite clear, but it's just difficult to believe anything's happened, because there's no visual indication anywhere, meaning if you run:

tomcat8w //ES//YourServiceName 

to get the GUI config tool you will not see the environment variable anywhere, but if you run the service it will pick it up. It's like hidden magic. Don't know why they haven't included it somewhere in the config panel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!