|
From: Leif M. <le...@ta...> - 2003-08-06 02:48:10
|
Chad,
How does your application retrieve the PATH and ORACLE_HOME
environment variables? Java 1.1 used to allow you to call
System.getenv( "PATH" ); But that method was deprecated in Java 1.2 and
started throwing a java.lang.Error if called.
The only way that I am aware of to pass an environment variable into
the JVM
is to use a -D parameter when launching the JVM. This can be done from
within
the wrapper.conf file with the following properties:
wrapper.java.additional.1=-DPATH="%PATH%"
wrapper.java.additional.1.stripquotes=TRUE
wrapper.java.additional.2=-DORACLE_HOME="%ORACLE_HOME%"
wrapper.java.additional.2.stripquotes=TRUE
The stripquotes properties are not really necessary, but they will
make the
configuration file work correctly on UNIX systems. If you are only
working on
windows you can leave them out. The values are quoted so that any spaces
in the environment variable values will be handled correctly.
If you wish, you can set the environment variable inside the
wrapper.conf
file by using the set.PATH=nnn syntax. This must be set before it is used
in the file.
To make sure that your environment variables are being passed to the
Wrapper correctly, please set the wrapper.debug=true property and then
run your application. You will see the full Java command used to launch
the JVM. If expanded PATH value is visible there then your application
should be able to use it.
Let me know if you are still having any problems getting this working.
Cheers,
Leif
Chad Cannell wrote:
> My app doesn't seem to be able to grab Environment Variables now that
> I have it "Wrappered".
> It starts fine but does not seem to be aware of the PATH and
> ORACLE_HOME values my jboss app need to use oci drivers.
>
> I tried set.PATH=... but to no avail. How do I pipe in my ENV
> variables to my java app in the wrapper?
>
> c
|