30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Zend Server <strong>Reference</strong> Manual<br />

Zend Java Bridge<br />

The Zend Java Bridge provides PHP developers with a way to use existing Java code and build PHP<br />

applications that use Java code.<br />

The Java Bridge integrates Java code in PHP by connecting the PHP object system with the Java Bridge<br />

object system.<br />

Note:<br />

The Java Bridge requires that you have SUN Microsystems JRE 1.4 (or later) or IBM's Java 1.4.2 (or<br />

later) installed on your computer.<br />

During (or after) installing, (depending on the installation type, you are prompted to direct the installer to<br />

the JRE location. You should, therefore, already have JRE installed. 64-bit JRE is not supported.<br />

More information about JRE and the latest updates can be obtained from SUN Microsystems’s website.<br />

The Java Bridge PHP extension adds functions that allow you to instantiate new Java classes from inside<br />

your PHP script. Once a Java class is instantiated, the Java Bridge gets a message from the Zend<br />

Engine to execute the Java code. The Java Bridge executes the script and returns the results to the Zend<br />

Engine.<br />

Zend Server includes the Java Bridge PHP Extension and the ability to restart the Java Bridge and<br />

configure the Java Bridge settings (from Server Setup | Components).<br />

The Java Bridge is an optional component that is installed differently, depending on the operating system<br />

(WIN, UNIX) and the installation method format (EXE, DEB, RPM). Once the extension is installed and its<br />

status is On, PHP code can use the Java Bridge API to call Java objects.<br />

The process of calling Java objects in PHP is described in the following diagram:<br />

190

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!