Install php-java-bridge-linux general technology-Linux programming and kernel information in Linux. For details, refer to the following section. This article describes how to install Php/Java Bridge with the source code in linux.
1. Download JavaBridge (http://sourceforge.net/projects/php-java-bridge ). Because I used the source code to install PHP expansion, I downloaded the source code package php-java-bridge_4.0.7.tar.gz.
2, first extract: tar xzvf php-java-bridge_4.0.7.tar.gz. Then enter the decompressed Directory: cd php-java-bridge-4.0.7. Start Compilation: phpize &./configure -- with-java =/usr/local/java,/usr/local/java/jre & make. After the compilation is successful, run: chmod + x install. sh; install. sh. You are advised to modify php. ini on your own after installation. Restart apache. For more references for installation, see: http://php-java-bridge.sourceforge.net/pjb/installation.php
3. Compile a simple php test.
$ Str = new java ("java. lang. String", "hello ");
Echo $ str;
?>
Run this php. If you see hello, the installation is successful.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.