note 19554 added to ref.java
| From: | not_contactable at yahoo dot com | Date: | Sun, 03 Mar 2002 16:16:44 +0000 |
| Subject: | note 19554 added to ref.java | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-27294@lists.php.net to get a copy of this message | ||
Installation of PHP's Java module under Win32(Apache/IIS).
I install php in "C:\php", firstly I install with "php-4.1.1-installer.exe"(from
http://www.php.net/downloads.php), and then unzip the
"php-4.1.1-Win32.zip"(from http://www.php.net/downloads.php) to the C:\PHP.(because
all the extension dll files are from this zip file, including php_java.dll)
I also install my Java v1.3 in "C:\jdk1.3"
And My Program require JDBC connection of the Java Program, so I did install also the JDBC driver
for MySQL in "c:\JDBC4mysql\mm.mysql.jdbc-1.2c"(from http://www.mysql.com/Downloads/Contrib/mm.mysql.jdbc-1.2c.tar.gz).
About the PHP.ini:
1> You need to set the extension_dir="c:\php\extensions"(directory of all the
1> extensions dll files)
2> Add those lines at the end of php.ini
======
[Java]
extension=php_java.dll
java.class.path="c:\php\java\php_java.jar;c:\wwwroot; c:\JDBC4mysql\mm.mysql.jdbc-1.2c"
java.home="c:\jdk1.3\bin"
java.library="c:\jdk1.3\jre\bin\hotspot\jvm.dll"
java.library.path="c:\php\extensions"
======
* extension: it is the DLL you wish to load in, here we want to load the java module.
* java.class.path: By default, you need to include the "C:\php\java\php_java.jar" for Java
& PHP connection, AND those directories that contain the Java class files you wish to run. Here,
my program Java classes are in "c:\wwwroot\", and ALSO the JDBC driver classes in
"c:\JDBC4mysql\mm.mysql.jdbc-1.2c", because my Program need to import it.
* java.home: the bin directory (directory of java.exe)
* java.library: jvm.dll is supposed to be under JDK's jre\bin\hotspot, but sometimes it
doesn't, try to Find(Start->Find) jvm.dll where it is.
* java.library.path: which is the same as the extensions directory.
--
http://www.php.net/manual/en/ref.java.php
http://master.php.net/manage/user-notes.php?action=edit+19554
http://master.php.net/manage/user-notes.php?action=delete+19554
http://master.php.net/manage/user-notes.php?action=reject+19554