As the title says I want to use classes and functions provided by a web app running on tomcat 7 in a php script running on a wamp server. Although I did find something related, I did not find anything step by step on how to execute custom java classes and functions in php. I did manage to make this work though:
require_once $_SERVER['DOCUMENT_ROOT']."JavaBridge/java/Java.inc";
$System = java("java.lang.System");
echo $System->getProperties();
In the end I want to be able to do something like that:
$abc= java("myproject.abc");
where abc is a custom class in myproject
.
Btw. I did look in the offical guide (http://php-java-bridge.sourceforge.net/pjb/webapp.php) but it either isn't helpful or I just don't get it. I also found that stackoverflow post (How to call custom java methods from PHP?), problem is, I don't really now what he means by
Now just copy your java jar file in tomcat /webapps/JavaBridge/WEB-INF/lib/ folder...
What java.jar
files?
Thanks in advance.