My fault, sorry. The jxl documentation states that the createWorkbook()
method is in jxl.Workbook, not in jxl.write.Workbook or
jxl.write.WritableWorkbook which I have inferred from its name.
Attached is a testjxl.php which will work.
Regarding the null pointer exception, please read that as a "class not
found exception". It's actually a bug in the bridge 1.0.6a private
classloader which is trying to access a null java_library_path. I will
change that null pointer to a proper "class not found exception" in the
upcoming version 1.0.7. Thank you for reporting this problem. Here's
the relevant log from /var/log/php-java-bridge.log:
try to load class jxl.write.WritableWorkbook from
jar:file:/usr/share/java/jdom.jar!/
java.lang.NullPointerException
at JavaBridge$1.findClass(JavaBridge.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:562)
at java.lang.ClassLoader.loadClass(ClassLoader.java:494)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:256)
at JavaBridge.CreateObject(JavaBridge.java:356)
at JavaBridge.handleRequests(Native Method)
at JavaBridge.run(JavaBridge.java:158)
at java.lang.Thread.run(Thread.java:568)
BTW: The new PHP 5 engine allows introspection, so when the bridge
supports PHP 5, it will be possible to look inside a class and to
interactively pick a certain method or property of a class.
Jost
|