Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 189683

Summary: www-servers/tomcat - Env Variables inaccessible when launching from init script
Product: Gentoo Linux Reporter: Mikael FRECHE <mikael.freche>
Component: Current packagesAssignee: William L. Thomson Jr. (RETIRED) <wltjr>
Status: RESOLVED INVALID    
Severity: normal CC: java
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mikael FRECHE 2007-08-21 09:47:20 UTC
Hello,

( please forgive my possible mistakes in English )

I'm using Tomcat from a while now and have got some webapps running very well in many tomcat configurations, but... not with Gentoo's inits scripts.

I'm using in my code the System.getEnv("CATALINA_HOME") method to retrieve some files on the system.

Or when I'm launching Tomcat with the init scripts, the environment variables seems unusable.
Comment 1 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-08-21 14:22:34 UTC
(In reply to comment #0)
>
> I'm using in my code the System.getEnv("CATALINA_HOME") method to retrieve some
> files on the system.

Wrong in more than one place.

First off it's
System.getenv(String name)
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html

Second your using the wrong function and argument. This works
System.getProperty("catalina.home")

Closing as invalid. Unless a test case can be provided to prove the above does not work, but that's unlikely.