tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narendra Sharma" <Narend...@sigmasoft.biz>
Subject RE: Obtain catalina-home variable
Date Mon, 02 Jun 2008 13:28:51 GMT
The OS doesn't really matter as you are using a Java property.

It should work the same way on windows and Linux.

Regards,
Narendra Sharma,
Technical Architect.

-----Original Message-----
From: maux [mailto:maux123@wanadoo.es] 
Sent: Monday, June 02, 2008 6:57 PM
To: users@tomcat.apache.org
Subject: Re: Obtain catalina-home variable


Thanks a lot.

Konstantin Kolinko wrote:
> 
> Yes, it is OK for all operating systems.
> 
> 
> 2008/5/29 maux <maux123@wanadoo.es>:
>>
>> Hi Konstantin,
>>
>> That´s exactly what i wanted. But if I used
>> "System.getProperty("catalina.home")", that is ok for windows and for
>> linux
>> Tomcat installation or is it only valid for windows?
>>
>> Thank you very much.
>>
>>
>> Konstantin Kolinko wrote:
>>>
>>> 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 <markt@apache.org>:
>>>> 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: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Obtain-catalina-home-variable-tp17509750p17601314.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message