|
From: <php...@li...> - 2009-04-30 07:36:05
|
I think this feature isn't useful for applications. The tomcat container
uses it to open the .war files:
<?php require_once("
http://localhost:8081/JavaBridgeTemplate5442/java/Java.inc");
echo
java("java.lang.Thread")->currentThread()->getContextClassLoader()->getResource("php/java/bridge/global.properties");
echo "\n";
?>
=>
jar:file:/home/opt/apache-tomcat-6.0.18/webapps/JavaBridgeTemplate5442/WEB-INF/lib/JavaBridge.jar!/php/java/bridge/global.properties
If you write your own class loader derived from url class loader, you may do
the same from PHP -- java_require uses an url loader, but it also needs a
timestamp.
There are several papers from rice.edu on this topic (java "link-time
components"), for example this one: http%3A%2F%2Fwww.cs.rice.edu
%2F~javaplt%2Fpapers%2Fsac2007.pdf
Regards,
Jost Boekemeier
Apr 29, 2009 9:48 vorm. schrieb am <
php...@li...>:
Hello,
do you mean that fat jar is not the best solution? How to use jar://URI?
(maybe a simple example or a link where I can find some examples) Where
exactly do I find the proposal?
Hi, Although it is possible to fetch libraries from other jar files using a
jar:// URI, at least ...
|