Hi Bharath,
which JDK and Windows OS version do you use? I do not
understand why some versions of windows require the
SystemDir environment variable. There's no reliable
way to read or set environment variables from java.
I have just tested on several systems, including XP
home and win98, none of these need SystemDir. The
only system that I know of is XP, but this problem
goes away when I install network programs.
Maybe it is necessary to set a registry entry which
points to the correct SystemDir. I will check this.
> Variable was pointing to C:/Windows (the correct
> path) but in the later
> case
> It was pointing to C:/Winnt (a non existent folder
> on the machine).
In JDK1.4 it is hard-coded. The code which does this
(in CGIServlet) looks like this:
try {
var=System.getenv("SystemDir");
} catch (Throwable t){}
if(var==null) var="c:/winnt";
The problem is that Sun has introduced getenv() in JDK
1.2, then deprecated it in 1.4 and then un-deprecated
it in 1.5 and now recommends this to pass the
environment to the sub-process.
In other words there is no reliable way to ask for the
value of SystemDir in java.
I think it is possible to read the registry from
jdk1.4. But this will not work either if the registry
key (which one?) is missing.
I have re-opened the ticked.
As a workaround please use Apache/Php/PhpJavaBridge
and Tomcat/mod_jk connector. This is described in the
INSTALL instructions and in the README. This is also
much faster than calling CGI programs or native code
from java.
Regards,
Jost Boekemeier
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
|