Hello there , Here I have got very tricky problem.Most of you might not find it very tricky...but surely it is for me. Well let me get to the problem. I have a environment variable (on windows NT 4.0) by name SERVER_HOME(it is the installation dir for server).My requirment is to read that variable inside the java program(to know the server installation dir). I tried to read it by getting the system properties.But the environment variable(SERVER_HOME) doesn't appear as system properties. I even tried it by using the echo command(DOS command) using the Runtime.exec() method.But somehow the echo command doesn't seem to run thru the java program. Can someone guide me how do i do this? I am using java1.2.2 OS windows NT 4.0 Thanks in advance Shashi
I've seen this done before writing the os property to the JVM property using the command line (it looks like this java -DSERVER_HOME=%SERVER_HOME% package.Class If you put it in a batch file it should work nicely. Dave.
shashi sonawane
Greenhorn
Joined: Jun 12, 2001
Posts: 2
posted
0
But what if it is the servlet which want to read the same parameter?
Originally posted by David O'Meara: I've seen this done before writing the os property to the JVM property using the command line (it looks like this java -DSERVER_HOME=%SERVER_HOME% package.Class If you put it in a batch file it should work nicely. Dave.