|
From: <php...@li...> - 2009-01-27 17:45:36
|
Hi Jon,
> [...] I assume you are saying by the
> above that I could no longer simply recompile the 3.2.1 bridge source
> with the latest PHP source to produce a viable bridge extension to
> PHP, is that right?
Yes.
> Are you speaking from the point of view of someone who is
> trying to access PHP from Java -or- call Java libraries from PHP?
Both still work. It's just that the java.so/php_java.dll extension is not necessary anymore (PHP >= 1.4).
> It seemed easy with the old 3.2.1 version of the bridge
It is even easier now that we've scrapped the java extension. Just install a servlet engine or J2EE server on a computer within your intranet and use:
require_once("http://yourServer:8080/JavaBridge/java/Java.inc");
in your scripts to access it.
If you want to start Java with each PHP script invocation, use the JSR 223 API (Java >= 1.6):
jrunscript -classpath JavaBridge.jar -l php testScript.php
> java_require(3rd party jar files...);
> $props = new Java("java.util.Properties");
> $props->put("someval","sourcedir");
Yes. Just add a java_require(".../Java.inc") to your script.
Regards,
Jost Boekemeier
|