I need to pass a couple environment variables from Suse Linux 11 to MyEclipse, so that ${ENV[envvarname]} will be substituted in properties. This works when I run MyEclipse in Windows–but not from Linux.
I have added the following lines to the myeclipse.ini file:
-DTOMCAT_SERVER=”$TOMCAT_SERVER”
-DCIS_ENV=”$CIS_ENV”
where $TOMCAT_SERVER and $CIS_ENV are bash variables. (I can echo $TOMCAT_SERVER in bash and see the string that I want.)
There is no substitution into properties, and if I attempt to retrieve these environment variables in my application:
String tomcat_server = System.getProperty(“TOMCAT_SERVER”);
String cis_env = System.getProperty(“CIS_ENV”);
they come back null. What am I missing here?
UPDATE: I can get the environment variables if I call System.getenv instead–but this does not substitute the environment variables into properties, as it does on Windows. There has to be something different, yet I am running Java 1.5.0_04 on both Windows and Linux.