PHP-JAVA Bridge extension

This post was written by Mahi-Bhat on January 15, 2008
Posted Under: How to set up a LAMP Server

1. Download php-java-bridge-3.2.1.tar.gz and extract the file as given bellow
gunzip php-java-bridge-3.2.1.tar.gz
tar -xvf php-java-bridge-3.2.1.tar
cd php-java-bridge-3.2.1

2. Next configure and build PHP-JAVA Bridge
./configure –with-java=/usr/java/jdk-1.5.08:/usr/java/jdk-1.5.0_08/jre
make install

This will create and JavaBridge.jar file in /usr/local/php/lib/php/20060613/ directory.

3. Create a file for setting Java paths
vi /etc/profile.d/ and add the following
export JAVA_HOME=/usr/java/jdk1.5.0_08
export PATH=$JAVA_HOME/bin:$PATH
export JRE_HOME=/usr/java/jdk1.5.0_08/jre
export PATH=$JRE_HOME/bin:$PATH

4. Set file access permissions
chmod 755 /etc/profile.d/

Reader Comments

The article about building a PHP Java Bridge was ver useful. We followed the steps mentioned by you and it worked fine. Thanks a lot for your valuable information

Written By velmurugan on April 6th, 2010 @ 10:46 AM

Add a Comment

required, use real name
required, will not be published
optional, your blog address

Next Post:
Previose Post: