i required replace hard coded java jre path java_home environment variable in applications' startup scripts in windows 8 server. in scripts, code this: set java_home = c:\program files(x86)\java...
these scripts conf files. haven't worked on script before , don't want screw applications. know in cmd can call set java_home path environment variable. advise me how in configuration (.conf in case) scripts? thanks.
edited: let me more specific here. java service wrapper , code like: set java_home=c:\program files (x86)\java\jre1.8.0_51 wrapper.java.command=%java_home%/bin/java
should remove set line , wrapper.java.command pick right value of java_home. correct if don't need set java_home different value system default, don't need use set? thanks.
not sure you're going able this.
environment variables specific command shell interpreter, why *nix shells can use different syntax.
if application reading conf file , applying path (i.e., java path use), have prepared handle rather accept path fully-qualified.
the best bet might have base conf file has %java_home% (and other environment variables) baked in , generate run-time conf file actual fully-qualified path. not sure windows tools best, might easier if have cygwin.
what i'm not understanding why specifying @ all. applications inherently use java_home in environment, if have set globally app should pick up, , nothing in conf file required. guess if had multiple java installs , needed pick , choose on per-app basis, i'd have startup script set java_home before doing else, , again remove .conf , let app pick up.
Comments
Post a Comment