The answer is correct as a direct match to the question, but I would
recommend using the following code instead:
System.getProperty("catalina.home")
System.getProperty("catalina.base")
The catalina.bat / catalina.sh script passes values of CATALINA_*
environment variables as system properties, when launching the JVM,
e.g., citing from one of those files:
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
When launching Tomcat as service in MS Windows those system properties
are defined directly by the service launcher (see Java Options field
in Java tab in the configuration dialog).
2008/5/28 Mark Thomas <[EMAIL PROTECTED]>:
> maux wrote:
>>
>> Hi,
>>
>> I would like to know how can i catch the catalina_home variable in a java
>> code.
>>
>> Thanks in advance.
>
> System.getenv()
>
> Mark
>
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]