Hi,
I am using tomcat 5.0 on a win2K box, and i cant seem to get an environment variable of mine to be set at startup.
The idea is that I would have a variable called VARIABLEG, that i could setup at tomcat startup, and then retrieve this variable later in a java program, the following way:
<code>
String var = System.getProperty("VARIABLEG");
System.out.println(var);
</code>
I tried by creating that variable in the startup.bat, by putting the following line, but it didn't work(I got a null value!!):
<code>set VARIABLEG=something</code>
I also googled it and found a way to do it by using the configure program under "apache software foundation" in the windows start/program files menu.
I added a line in the java options:
-DVARIABLEG=something
but that didn't work either.
I'm running out of options, and can't understand why such a simple thing is such a headach to get working!
Is there something I'm doing wrong, or am I just being plain dumb and stupid???
La faim justifie les moyens!
I am using tomcat 5.0 on a win2K box, and i cant seem to get an environment variable of mine to be set at startup.
The idea is that I would have a variable called VARIABLEG, that i could setup at tomcat startup, and then retrieve this variable later in a java program, the following way:
<code>
String var = System.getProperty("VARIABLEG");
System.out.println(var);
</code>
I tried by creating that variable in the startup.bat, by putting the following line, but it didn't work(I got a null value!!):
<code>set VARIABLEG=something</code>
I also googled it and found a way to do it by using the configure program under "apache software foundation" in the windows start/program files menu.
I added a line in the java options:
-DVARIABLEG=something
but that didn't work either.
I'm running out of options, and can't understand why such a simple thing is such a headach to get working!
Is there something I'm doing wrong, or am I just being plain dumb and stupid???
La faim justifie les moyens!