开发者

Environment Variable in 64 bit OS nor recognized without reboot

I have Installshiled script which define CATALINA_HOME as environment Variable initially. same script after that execute the batch file service.bat that is using CATALINA_HOME. this file when executed display the error CATALINA_HOME is not define define corr开发者_高级运维ectly. as this variable is defined as environmental VARIABLE and pointing Tomcat Directory Properly. I thing the system require reboot to recognize environment Variables.Is there any way to define Environment that work directly without reboot. I am using 64 bit Windows 7.


I may be wrong but the script that you're running loads the env variables once when you start it so you won't get any new env variables added during the runtime of the script.

And in your script, if you just execute the batch file, it will use the same out dated env variables the script started with.

What I do is run 'cmd /k service.bat' This starts a new shell (with the updated env variables) and runs the batch file and terminates afterwards.

You shouldn't need to reboot between your install.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜