|
From: <php...@li...> - 2014-06-28 06:47:57
|
My set up that is working is using Tomcat for the container, once installed in webapps, all I have to do is call it thusly:
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
and I can use java classes.
Hope that helps.
--Nathan
On Friday, June 27, 2014 7:11 AM, "php...@li..." <php...@li...> wrote:
Hi everyone!!!!
I would like to ask how to call a java class from php.
After research on internet, I’ve following a tutorial who tells me to put my project in jar file and to put it on Tomcat/webapps/myproject/WEB-INF/lib. And then to call it on my php script with
<?php
require_once("java/Java.inc");
$obj = new Java('HelloWorld');
?>
But it doesn’t work.
I have followed the jee documentation with javabridge.zip too. I put my project in .war file and put the .jar into Tomcat/webapps then it deployed my project. After that, I create php file and put this script
<?php
define("JAVA_HOSTS", 127.0.0.1:8080);
define("JAVA_SERVLET", "/JavaBridge/servlet.phpjavabridge");
require_once("java/Java.inc");
echo java("java.lang.System")->getProperties();
?>
PS I’m working on Apache for php and Tomcat for java.
Both don’t work.
Need help , please.
Thanks.
Finoana
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|