eZpedia : The Free eZ Publish CMS Documentation Encyclopedia

Java

This is a Stub article. Help the eZ Publish community by expanding it!

About

It is possible to create php java bridge as form of proxy using pjb. With a pjb bridge you may call Java from PHP or PHP from Java, in either direction.

Building the PHP / Java bridge

Howto build and install the PHP / Java bridge on Debian

Download php-java-bridge

wget http://switch.dl.sourceforge.net/sourceforge/php-java-bridge/php-java-bridge_3.0.8.tar.bz2

Decompress the file

tar xvjf php-java-bridge_3.0.4.tar.bz2

Go to the directory

cd php-java-bridge-3.0.4

Execute (In order to use this you'll need to have the php4-dev package installed)

phpize
 

After, execute (Be sure to set this to the path where your jdk is installed)

./configure --with-java=/opt/j2sdk1.5-sun

If the ./configure command fails because the automake version is < 1.6 try this :

apt-get install automake1.6
update-alternatives --config automake

Select version 1.6 of automake in the update-alternatives dialog and then try to run ./configure again

Now we just need to compile and install, this is done by:

make
make install-modules

Add this line to php.ini in order to enabled the PHP/Java bridge extension:

extension=java.so

External reference

Article provided by eZpedia

All text is available under the terms of the GNU Free Documentation License

Powered by eZ Publish Community Project 4.2011

Hosted by Swiss eZ Publish partner YMC