开发者

calling java code from PHP

开发者 https://www.devze.com 2023-02-23 00:08 出处:网络
I have a PHP web application developed using symfony framework. I want to call some Java code from within my PHP pages. Java code is distributed to multiple jar files and there is o开发者_C百科ne inte

I have a PHP web application developed using symfony framework. I want to call some Java code from within my PHP pages. Java code is distributed to multiple jar files and there is o开发者_C百科ne interface available to access the functionality. The input and outputs of the Java interface are XML files, text files, Java beans and some more complex objects.

Is there any bridge available in PHP to call complex Java methods or some other solution to this problem. Alternatively, I have to write soap web services to solve this problem.


You may want to look at these:

  • Zend Platform Java Bridge
  • PHP/Java Bridge

HTH


you could run the java code by exec or shell_exec ex.

shell_exec("java whatever.jar $parameter1 $parameter2");

Webservices would be the nicer solution though. IMO

0

精彩评论

暂无评论...
验证码 换一张
取 消