Re: Java
| From: | Alex Akilov | Date: | Wed, 20 Dec 2000 22:34:45 +0000 |
| Subject: | Re: Java | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4568@lists.php.net to get a copy of this message | ||
Dario Carnelutti wrote:
> I using php4 pl1 and i'm trying to use Java whit php.
>
> java.class.path="c:\php\php_java.jar;c:\jdk1.3\jre\lib;c:\jdk1.3\jre\bin"
The last two directories you have specified are not necessary since they
do not contain any .class or .properties files. If you want to add a
specific jar file (and all it contains) to the classpath then you must
specify
the full jar file name (not just the directory where it is).
> java.home=C:\jdk1.3\bin
I'm not sure if this needs to be set with this JDK level but this should
actually
simply point to C:\jdk1.3. The bin directory contains the JDK tools but the
java.home should be the root directory from which the JRE can be found as
well as the bin directory which contains the tools. In your case, since you
actually want to use a separate jre, you might wish to not set java.home and
be explicit whereever directories are needed to locate dlls and so on.
> java.library="c:\program files\javasoft\jre\1.3\bin\hotspot\jvm.dll"
Not sure why you have a separate jre installed (unless your jdk uses the
Classic vs. Hotspot JVM) since your jdk1.3 already contains a jre in
c:\jdk1.3\jre. However, this doesn't matter, especially if they are from
the same vendor and at the same level. If they are both the same, then
to save space on your drive you might opt to remove the above jre and
simply use java.library=c:\jdk1.3\jre\bin\hotspot\jvm.dll. However, if
your jdk1.3 is a classic JVM and you want to take advantage of the
Hotspot performance then leave things as they are but use the Hotspot
jre in all places where you reference any jre related settings.
Alternatively,
you might wish to install your Hotspot JRE over the top of your jdk1.3\jre
directory so that you eliminate confusion as to which JRE to use.
Last but not least, make sure that your system CLASSPATH or
java.class.path above include your <jre>\lib\rt.jar. This file contains
all the necessary java runtime classes (and properties files).
Alex