Call java from php?
I would like to call my java program from php. How is it possible I know of zend bridge but when I read it say it will take our the existing php which I am not sure what other side effect I will have to face. Any other solution to this problem? Thank you.
Do you want to integrate Java into PHP or just execute a Java program as you would do it on the shell? The latter can be accomplished with
$res = shell_exec('java -jar myprogram.jar');
I will need to pass some arguement to my java program from php. How to use your method to achieve that? Thank you.
The same way as you would do on the shell. shell_exec() does nothing else than executing a shell command. Please have a look at the PHP manual on php.net.