I USE APACHE2TRAID FOR PHP.
i downloaded 'PECL 5.2.5 Win32 binaries' from http://www.php.net/downloads.php and rename its as jdk1.5.0_05(folder name) and put in extensions folder.Cut php_java.dill from jdk1.5.0_05 folder to extenstion folder.
Folder structure
F:\apache2triad\php\extensions\php_java.dill
F:\apache2triad\php\extensions\jdk1.5.0_05\php_java.jar
i have done following changes in php.ini file
extension=php_java.dll
;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;
[java]
; This must point to the location of php_java.dll.
java.library.path = "F:\apache2triad\php\extensions;"
; This points to the directory where your Java
; classes will be stored. You can designate multiple
; paths, each path separated by a semicolon.
; It must also include the location of php_java.jar
java.class.path = "F:\apache2triad\php\extensions\jdk1.5.0_05\php_java.jar;"
; This points to the bin directory of the JDK.
java.home = "C:\Program Files\Java\jdk1.5.0_05\bin"
; This must point to the Java Virtual Machine (jvm.dll) file.
java.library = "C:\Program Files\Java\jdk1.5.0_05\jre\bin\server\jvm.dll"
but when i restart the php apache its shows alrt message
"PHP Startup:unable to load dynamic library 'F:\apache2triad\php\extensions\php_java.dill'-the specified procedure could not found "