These are the php.ini settings:
java.java = "c:\Program Files\java\jdk1.5.0_06\bin\javaw.exe"
java.java_home = "c:\Program Files\java\jdk1.5.0_06"
java.log_level = 3
java.libpath = "c\php5\ext"
java.class.path = "c:\php5\ext\JavaBridge.jar"
you need to set java.class.path to JavaBridge.jar. php_java.jar is the jar file of the pecl extension. Be careful not to mix up the pecl version of java support and the php/Java bridge.
I think that there were two problems:
- some kind of mixup between the pecl java support and the PHP/Java bridge
- version incompatibilities, like using the php 5.0 version of the bridge with php 5.1 and vice versa
One last important note:
In order to use your custom classes and jar files you need to include them with java_include before you can use them in your php scripts, like e.g.
java_include("C:\javaclasses;C:\javaclasses\mycustomjar.jar");
If you have any jar files in e.g. C:\javaclasses then you need to add them to the java_include string separately because adding only C:\javaclasses will include only .class files in C:\javaclasses. You don't need to include each .class file in the java_include string but you need to make sure that the class files reside in a directory structure that matches the package(s) used in the class files.
Example: You have a class named test in package com.mydomain.myproject.mysubpackage
Then create a directory structure C:\javaclasses\com\mydomain\myproject\mysubpackage and put test.class in the mysubpackage directory.
Thomas