|
From: <php...@li...> - 2009-04-28 14:05:49
|
afaik one can not nest jar's (exceptions are war, ear, etc.)
=> you have to put all the jar's you want to use directly into /WEB-INF/lib
or /WEB-INF/classes etc.
try that.
also it looks like the code you provided below does not correspond to the
exception you gave
(because there is no java_require("WebProject2.jar") in your code)
dominik
2009/4/28 <php...@li...>
> Hello Jost,
> I am very sorry but I still can't solve the problem which I described
> yesterday. I try to explain it again in other words, maybe I explained it
> not very clearly.
> Well there are many jars in one jar (fat jar) I don't have to change
> anything in this structure, I need only to access the classes .
> I tryed to get it with java_require and got this error:
> exception javax.servlet.ServletException: java.lang.RuntimeException: PHP
> Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed:
> [[o:JavaBridge]]->updateJarLibraryPath((o:String)[o:String],
> (o:String)[o:String], (o:String)[o:String], (o:String)[o:String]). Cause:
> java.io.IOException: Could not open jar file WebProjekt2, reason:
> WebProjekt2 (Das System kann die angegebene Datei nicht finden) VM:
> 1.6.0_10@http://java.sun.com/" at:
> #-18
> php.java.bridge.DynamicJavaBridgeClassLoader.checkJarFile(DynamicJavaBridgeClassLoader.java:108)
> #-17 php.java.bridge.JarLibraryPath.createUrls(JarLibraryPath.java:192)
> #-16 php.java.bridge.JarLibraryPath.checkURLs(JarLibraryPath.java:117)
> #-15 php.java.bridge.JarLibraryPath.<init>(JarLibraryPath.java:64)
> #-14
> php.java.bridge.DynamicJavaBridgeClassLoader.checkJarLibraryPath(DynamicJavaBridgeClassLoader.java:74)
> #-13
> php.java.bridge.DynamicJavaBridgeClassLoader.updateJarLibraryPath(DynamicJavaBridgeClassLoader.java:87)
> #-12
> php.java.bridge.SimpleJavaBridgeClassLoader.updateJarLibraryPath(SimpleJavaBridgeClassLoader.java:111)
> #-11 php.java.bridge.J in http://localhost:8081/Ordner/java/Java.inc on
> line 215
>
> php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:416)
> php.java.servlet.CGIServlet.doGet(CGIServlet.java:469)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> root cause java.lang.RuntimeException: PHP Fatal error: Uncaught
> [[o:Exception]:"java.lang.Exception: Invoke failed:
> [[o:JavaBridge]]->updateJarLibraryPath((o:String)[o:String],
> (o:String)[o:String], (o:String)[o:String], (o:String)[o:String]). Cause:
> java.io.IOException: Could not open jar file WebProjekt2, reason:
> WebProjekt2 (Das System kann die angegebene Datei nicht finden) VM:
> 1.6.0_10@http://java.sun.com/" at:
> #-18
> php.java.bridge.DynamicJavaBridgeClassLoader.checkJarFile(DynamicJavaBridgeClassLoader.java:108)
> #-17 php.java.bridge.JarLibraryPath.createUrls(JarLibraryPath.java:192)
> #-16 php.java.bridge.JarLibraryPath.checkURLs(JarLibraryPath.java:117)
> #-15 php.java.bridge.JarLibraryPath.<init>(JarLibraryPath.java:64)
> #-14
> php.java.bridge.DynamicJavaBridgeClassLoader.checkJarLibraryPath(DynamicJavaBridgeClassLoader.java:74)
> #-13
> php.java.bridge.DynamicJavaBridgeClassLoader.updateJarLibraryPath(DynamicJavaBridgeClassLoader.java:87)
> #-12
> php.java.bridge.SimpleJavaBridgeClassLoader.updateJarLibraryPath(SimpleJavaBridgeClassLoader.java:111)
> #-11 php.java.bridge.J in http://localhost:8081/Ordner/java/Java.inc on
> line 215
>
> The video which you recommended is only about one "folder"with classes. In
> my case it is not so.
> As Ihave already written "jars in jar"(fat jar) and I must not change this
> structure...
> It does not work:
> <?php
> require_once("http://localhost:8081/Ordner/java/Java.inc");
>
> $System = java("java.lang.System");
>
> $myObj = new java("web.FacettenBrowser");
> echo $myObj->HalloWelt();
> ?>
>
> Many thanks in advance!
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> php-java-bridge-users mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
>
|