|
From: Silent K. <the...@gm...> - 2005-10-12 21:45:53
|
Hi all, I am a happy user of Java Service Wrapper, using it in several components. But I have a few queries regarding the use of the configuration file. Is it possible to use environmental variables in the config file (wrapper.conf)? For example, one of the command line arguments that I am using is now of the form, wrapper.java.additional.1=-Dbase=C:\installroot But installroot is something that is decided by the user while installing the product. In such a case, is it possible to dynamically change the value of my argument in the configuration file? I can see two possible ways of doing it. Option1: Set an environmental variable during installation. Something like MyProductInstallHome which points to C:\installroot. And I should be able to set the property in the configuration file as wrapper.java.additional.2=-Dbase=%MyProductInstallHome% Option2: Allow batch commands in the configuration file. So that I can do something like wrapper.java.additional.2=-Dbase=%cd%\.. (what I mean here is that %cd% should give me the current directory, which in my case is C:\installroot\config and \.. will take me one level up so that I can get to the correct install root. I hope I have been clear in my request so far. Out of the two options I have stated above, is any of them possible? If at all possible, I would prefer the second option so that I do not have to rely on environmental variables. Or I am completely off track here? Is there some other way to handle dynamic arguments? Any pointers on this would be greatly appreciated. Thanks, SK |