Thanks Jost
Here is my configuration
Windows XP professional SP2
JDK - 1.4.2_05
I will use the work around for the time being
Regards
Bharath
-----Original Message-----
From: Jost Boekemeier [mailto:jos...@ya...]=20
Sent: Wednesday, September 07, 2005 1:10 PM
To: Bharath Thirunavukkarasu;
php...@li...
Subject: Ant: RE: RE: [Php-java-bridge-users] Re:trouble getting php
java bridge to run under tomcat
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.=20
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. =20
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).=20
In JDK1.4 it is hard-coded. The code which does this
(in CGIServlet) looks like this:
try {
var=3DSystem.getenv("SystemDir");
} catch (Throwable t){}
if(var=3D=3Dnull) var=3D"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
=09
=09
=09
___________________________________________________________=20
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de
|