Zend Java Bridge

The Zend Java Bridge provides PHP developers with a way to use existing Java code and build PHP applications that use Java code.

The Java Bridge integrates Java code in PHP by connecting the PHP object system with the Java Bridge object system.


The Java Bridge requires that you have SUN Microsystems JRE 1.4 (or later) or IBM's Java 1.4.2 (or later) installed on your computer.
During (or after) installing, (depending on the installation type, you are prompted to direct the installer to the JRE location. You should, therefore, already have JRE installed. 64-bit JRE is not supported.
More information about JRE and the latest updates can be obtained from SUN Microsystems’s website.

The Java Bridge PHP extension adds functions that allow you to instantiate new Java classes from inside your PHP script. Once a Java class is instantiated, the Java Bridge gets a message from the Zend Engine to execute the Java code. The Java Bridge executes the script and returns the results to the Zend Engine.


Zend Server includes the Java Bridge PHP Extension and the ability to restart the Java Bridge and configure the Java Bridge settings (from Server Setup | Components).

The Java Bridge is an optional component that is installed differently, depending on the operating system (WIN, UNIX) and the installation method format (EXE, DEB, RPM). Once the extension is installed and its status is On, PHP code can use the Java Bridge API to call Java objects.


The process of calling Java objects in PHP is described in the following diagram:



The Zend Java Bridge provides the following advantages:



Related Links

Related Links:


Working with Components

Working with the Java Bridge

Zend Java Bridge - Configuration Directives

Zend Java Bridge - PHP API

Java Bridge Use Cases