Home > php教程 > PHP源码 > body text

PHP与java 通信插件

PHP中文网
Release: 2016-05-20 12:58:09
Original
1251 people have browsed it

跳至

复制Java.inc放到网站目录里面调用就OK了
/usr/local/php/lib/php/extensions/no-debug-zts-20100525/java/Java.inc
修改:
define ("JAVA_HOSTS", "127.0.0.1:8080");
// define ("JAVA_PERSISTENT_SERVLET_CONNECTIONS", true);
// define ("JAVA_PREFER_VALUES", 1);
define ("JAVA_DEBUG", false);
define ("JAVA_PIPE_DIR", "/data/test/java-tmp"); //这个是缓存文件地址
Copy after login

2. [代码][PHP]代码

// http://c.3viso.cn/java.php  这是一个测试小程序
#!/usr/bin/php

getProperty("java.version")." ";
$str=new Java("java.lang.String");
echo $str;
Copy after login

           

       

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!