Re: Tomcat path

James Williamson <[email protected]>
Newsgroups gmane.text.xml.soap.user
Organization Name On The Net Ltd
Message-ID <[email protected]>
Felipe Furtado Palma Dias wrote:

> I know, try
>  
> Start Java this way:
> CATALINA_HOME= c:\somedir\subdir\file
> java -Dcatalina.home=%CATALINA_HOME% javafilename
>
> Then access it by getting system properties:
> System.getProperty("catalina.home")

I'm assuming this is on a Un*x machine. If you inspect catalina.sh where 
CATALINA_HOME is
defined you'll notice it isn't 'exported/sourced' which means child 
processes will never see it.
Dependent on your shell you can do this:

(bash shell)
export CATALINA_HOME=c:\somedir\subdir\file

or

(c shell)
setenv CATALINA_HOME c:\somedir\subdir\file 

James

>     ----- Original Message -----
>     *From:* Francesco Dipalo <mailto:[email protected]>
>     *To:* [email protected] <mailto:[email protected]>
>     *Sent:* Monday, November 22, 2004 2:09 PM
>     *Subject:* Re: Tomcat path
>
>     returns null
>     TIA
>
>         ----- Original Message -----
>         *From:* Felipe Furtado Palma Dias <mailto:[email protected]>
>         *To:* [email protected] <mailto:[email protected]>
>         *Sent:* Monday, November 22, 2004 6:34 PM
>         *Subject:* Re: Tomcat path
>
>         System.getProperty("catalina.home")
>
>             ----- Original Message -----
>             *From:* Francesco Dipalo <mailto:[email protected]>
>             *To:* [email protected]
>             <mailto:[email protected]>
>             *Sent:* Monday, November 22, 2004 1:21 PM
>             *Subject:* Re: Tomcat path
>
>             I need to insert this thing in a java code
>             TIA
>
>                 ----- Original Message -----
>                 *From:* Tommy Kalafut <mailto:[email protected]>
>                 *To:* [email protected]
>                 <mailto:[email protected]>
>                 *Sent:* Monday, November 22, 2004 4:46 PM
>                 *Subject:* RE: Tomcat path
>
>                 Look at the java command line option -D
>
>                  
>
>                 H:\>java -help
>
>                 Usage: java [-options] class [args...]
>
>                            (to execute a class)
>
>                    or  java [-options] -jar jarfile [args...]
>
>                            (to execute a jar file)
>
>                  
>
>                 where options include:
>
>                     -client       to select the "client" VM
>
>                     -server       to select the "server" VM
>
>                     -hotspot      is a synonym for the "client" VM 
>                 [deprecated]
>
>                                   The default VM is client.
>
>                  
>
>                     -cp <class search path of directories and zip/jar
>                 files>
>
>                     -classpath <class search path of directories and
>                 zip/jar files>
>
>                                   A ; separated list of directories,
>                 JAR archives,
>
>                                   and ZIP archives to search for class
>                 files.
>
>                     -D<name>=<value>
>
>                                   set a system property
>
>                     -verbose[:class|gc|jni]
>
>                                   enable verbose output
>
>                     -version      print product version and exit
>
>                     -showversion  print product version and continue
>
>                     -? -help      print this help message
>
>                     -X            print help on non-standard options
>
>                     -ea[:<packagename>...|:<classname>]
>
>                     -enableassertions[:<packagename>...|:<classname>]
>
>                                   enable assertions
>
>                     -da[:<packagename>...|:<classname>]
>
>                     -disableassertions[:<packagename>...|:<classname>]
>
>                                   disable assertions
>
>                     -esa | -enablesystemassertions
>
>                                   enable system assertions
>
>                     -dsa | -disablesystemassertions
>
>                                   disable system assertions
>
>                  
>
>                 Tom
>
>                  
>
>                 Tom Kalafut
>                 Interchange Crew Member
>                 Trident Systems, Inc.
>                 [email protected]
>                 (703)691-7798
>
>                  
>
>                 -------------------------
>
>                 The opinions expressed in this email may not
>                 necessarily reflect the opinions of Trident Systems, Inc.
>
>                 < FRAME>size=2 width="100%" align=center tabindex=-1>
>
>                 * From: * Francesco Dipalo [mailto:[email protected]]
>                 *Sent:* Monday, November 22, 2004 10:44 AM
>                 *To:* [email protected]
>                 *Subject:* Tomcat path
>
>                  
>
>                 I need a java command to take the CATALINA_HOME
>                 environment variable in a string. How can I do? 
>
>                 TIA
>
>                  
>
>
>
>
>             ----
>             Email.it, the professional e-mail, gratis per te:clicca
>             qui <http://www.email.it/cgi-bin/start?sid=3>
>
>             Sponsor:
>             E' PROduttiva, PROfessionale, PROtetta...è Email.it Pro15,
>             Pro 50, Pro100 la casella più efficiente che puoi trovare.
>             Clicca qui
>             <http://adv.email.it/cgi-bin/foclick.cgi?mid=1046&d=22-11>
>
>
>
>
>     ----
>     Email.it, the professional e-mail, gratis per te:clicca qui
>     <http://www.email.it/cgi-bin/start?sid=3>
>
>     Sponsor:
>     Vuoi ricevere gratuitamente, ogni giorno, un trucco per imparare a
>     smanettare con il tuo PC?
>     Iscriviti ad Untruccoalgiorno, è FREE, è per tutti! Clicca qui
>     Clicca qui <http://adv.email.it/cgi-bin/foclick.cgi?mid=2732&d=22-11>
>


-- 
James Williamson
Name On The Net Ltd
web: http://www.nameonthe.net
email: [email protected]
phone: +44 (0)870 1657215
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.