Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Php/Java Integration

Tags:

java

php

Have you experience of integration of php and Java? I've written a class in Java "Hello". Now I want to call its method from php when I create an instance of this class from php with

$obj = new Java(Hello);

Then it gives me fatal error. I've tried many times to setup php ini variables etc but I couldn't find anything. Please advice me how can I set it up.

Thanks in advance


Reference: http://php.net/manual/en/book.java.php

like image 613
Novice Avatar asked Dec 12 '22 20:12

Novice


1 Answers

Have a look at:

PHP-Java Bridge

The PHP/Java Bridge is an implementation of a streaming, XML-based network protocol, which can be used to connect a native script engine, for example PHP, Scheme or Python, with a Java virtual machine. It is up to 50 times faster than local RPC via SOAP, requires less resources on the web-server side. It is faster and more reliable than direct communication via the Java Native Interface, and it requires no additional components to invoke Java procedures from PHP or PHP procedures from Java.

like image 120
Sarfraz Avatar answered Dec 15 '22 09:12

Sarfraz