|
From: <php...@li...> - 2008-02-13 18:53:42
|
Hi,
> Despite apache / tomcat being on the same server, it seems promiscuous needs to be on, as well
> as allow_url_include.
>
> So now I can load the Java.inc via:
>
> require_once("http://192.168.15.62:8080/JavaBridge/java/Java.inc");
The IP is interesting. However, if you want to connect to a back end running on any other
interface than 127.0.0.1, you need to switch on promiscuous mode, even if 192.168.15.62 resolve to
a local address. If you have disabled the loopback interface, please enable it. It is considerably
faster. (In promiscuous mode the bridge switches off named pipe communication, furthermore some OS
switch on Nagle's algorithm if the communication goes through a real network interface).
> But now, I cannot get java_require or java_autoload to get at my classes packaged within my web
> app.
java_require ("foo.jar") is equivalent to:
$here=getcwd(); java_require("$here/foo.jar");
Otherwise you must use an absolute path or even a URL, for example:
java_autoload("file:///c:/foo.jar;http://php-java-bridge.sf.net/baz.jar");
> java_require("http://localhost:8080/JavaBridge/myapp.jar");
Yes, this will work. Since version 4.1.0 the bridge copies
http://localhost:8080/JavaBridge/myapp.jar to file:/{java.io.tempdir}/myapp.jar and rewrites the
URL to use the local file instead.
> As I understand it, simply using java_require("myapp.jar") should be able to resolve correctly,
> considering the context of the Java.inc being within the JavaBridge web app.
The bridge tries to load myapp.jar from 1) /usr/share/java, 2) from $HOME/lib/ and 3) from
getcwd()/
Regards,
Jost Boekemeier
Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen
Yahoo! Mail. www.yahoo.de/mail
Machen Sie Yahoo! zu Ihrer Startseite. Los geht's:
http://de.yahoo.com/set
|