It doesn't seem like there is a built-in way, even support in php4 was experimental. Actually it makes no sense to run a Java virtual machine on every request for php. You can always use the shell shielding capabilities (backtick operator) if you need to do something in Java, but if you want to do something scalable, it should be its own Java service and accept SOAP / REST or whatever wanted to talk to her from php.
Abdullah jibaly
source share