After many frustrating hrs it finally works. The key is to use the hotspot jvm rather than the classic jvm. The hotspot jvm is designed for better performance in executing java code. Not sure why the classic jvm didn't work for me but the hotspot jvm works fine
Here is my system:
mandrake8.0
apache1.3.19
php4.1.1
sun microsystems jdk1.3.0_02
here are the steps to make this work: (check the paths to make sure they are the same on your system)
./configure --with-apxs --with-java ...other config options...
make
make install
LD_LIBRARY_PATH={PATH-TO-JDK}/jre/lib/i386/hotspot:{PATH-TO-JDK}/jre/lib/i386
export LD_LIBRARY_PATH
PATH=$PATH:{PATH-TO-JDK}
export PATH
CLASSPATH={PATH-TO-JDK}/jre/lib/rt.jar
export CLASSPATH
add this to /etc/ld.so.conf, you don't have to put this here, does the same thing as setting the LD_LIBRARY_PATH environment variable but you have to set LD_LIBRARY_PATH everytime you reboot if you don't put it in ld.so.conf
{PATH-TO-JDK}/jre/lib/i386/hotspot
{PATH-TO-JDK}/jre/lib/i386
[JAVA] of php.ini
java.class.path = /usr/local/lib/php/php_java.jar
java.home = /usr/java/jdk1.3.0_02
java.library = {PATH-TO-JDK}/jre/lib/i386/hotspot/libjvm.so
;java.library.path =
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20010901
extension=libphp_java.so
apachectl restart ...et voila!
email me if you have any questions. Good luck!