From: <php...@li...> - 2010-06-14 10:19:32
|
Hi, please see http://php-java-bridge.sourceforge.net/pjb/desktop-apps.php And please forget about CLASSPATH an java_require. Please see our FAQ for details. Regards, Jost Boekemeier Am 14.06.2010 11:57 schrieb <php...@li...>: I've never done any Java programming before, so I may be missing something fairly obvious here. I want to use the Saxon java classes to process XML 2.0 Xpaths via PHP. So I've done: java_require(SAXON_DIR."saxon9he.jar"); (where SAXON_DIR is predefined). I then find that I can directly access the Saxon classes via PHP , such as: $config = new java("net.sf.saxon.Configuration"); So all OK so far! However, for efficiency reason I don't want to make multiple PHP calls to java to do the Xpath processing. So I want to create my own java class which does all the necessary Saxon processing and can be accessed with one PHP call. I've created this class, built a JAR file (SaxonXPath.jar) and verified that it works via a standalone java program, run as: java -cp .:SaxonXPath.jar:saxon9he.jar TestProg So I now want to run this via PHP/java-bridge and have done: java_require(SAXON_DIR."saxon9he.jar"); java_require(SAXON_DIR."SaxonXPath.jar"); I put these into a catch/try block, so I have verified that they are successfully loaded. However, when I try and instantiate my class in "SaxonXPath.jar" I get the error: java.lang.ClassNotFoundException: Could not find com.legatio.xml.SaxonXPath in java_require() path. Please check the path and the SEL and File permissions. I can still access the "saxon9he.jar" classes directly and I've double-checked that I'm using the correct path to my own class. I tried setting "[java]" "java.classpath" in the php.ini file to the jar files directory location, but this made no difference. Does anyone have any idea of what I might be doing wrong here? ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |