0

I'm not sure how to proceed with this one but I want to get MPXJ working to write MPX files with my PHP app.

The Javabridge documentation says that I should copy the application's jar file that I want to bridge into the /WEB-INF/lib folder of the javabridge package. So I extracted mpxj.jar from the MPXJ zip file, copied it into the compressed javabridge file-folder and imported it into Tomcat.

I can do:

echo java("java.lang.System")->getProperties();  

so it appears javabridge is working ok

But when I try

$testvar = java("import net.sf.mpxj.MPXWriter");

It gives an error saying class not found. I suspect this might be a path issue? After "java" I'm a bit stumped!)

Can anyone help?

Jay
  • 1,317
  • 4
  • 16
  • 40
user3515232
  • 133
  • 2
  • 12
  • I'm not familiar with MPXJ, but could you run a scheduler in Tomcat to check a database of things to run in Java? So, rather than kicking things off in PHP directly, just create a queue table row and let Java pick it up when it's ready? I wonder if that will be simpler than using the JavaBridge in PHP. – halfer Apr 09 '14 at 12:50
  • Not sure about you syntax... can you try `$testvar = new java("net.sf.mpxj.MPXWriter");` instead? – Jon Iles Jun 27 '14 at 14:14

0 Answers0