|
From: <php...@li...> - 2008-12-12 22:29:37
|
I saw similar behaviour when I first set up the Java-Bridge. If Module A
called a function in Module B. And the function in Module B needed a jar
for a call in Module B. I assumed that I could include the jar in Module
B only. But I found that I needed to include it in Module A as well. Once
I saw it, it was not a big problem, but determining what was happening was
frustrating. Now I just put everything in the ext directory and it is
simpler. Everything loads statically on startup.
Charles Shaffer
Senior Analyst
NTN-Bower Corporation
php...@li...
12/12/2008 04:10 PM
Please respond to php-java-bridge-users
To: php...@li...
cc:
Subject: Re: [Php-java-bridge-users] How to debug NoClassDefFoundError exceptions?
Thanks for your reply.
After re-reading the FAQ thoroughly, I made several experiments to see
the bridge's reaction to placing the jars in different places. What I
found is this:
I had given a *relative* path for each jar to java_autoload. It loaded
them successfully, and I was able to *explicitly* instantiate classes
from all those autoloaded jars. However, if a Java class A tried to
instantiate a class B located in another jar, it ran the risk of not
finding the appropriate jar (even though, again, PHP was able to
instantiate B). What I mean by "risk" is that loading only sometimes
failed. When I specified the *absolute* paths for the jars, the
problem went away.
I would humbly suggest to document this behaviour in the FAQ, or to
fix the bridge such that the VM's class loader behaves just like
java_require.
Thanks,
K.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|