Or write a Java program that runs constantly and can communicate in some way (probably through SOAP) with your PHP application and use that as middleware.
But indeed, moving to a JSP/Servlet environment is the best option by far.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Thank you very much for the replies.....
I already setting up the apache using php_java bridge and it works well (the PHP can access all java class, such as java.lang etc).....
yes, write java application and php connect to the java application could be possible. However, im not quite sure how to call the class. There is a java example using the API which is run in command line. To run or compile this example, i have to call : java -classpath .:../...........how can avoid this problem?
another question : The class which i want to call is in jar file. It's in directory, say : aaa/bbb/ccc/ddd/eee......how to instantiate a class which is in a sub directories?
is it possible for me to just instantiate the API class (API available from the database server) and call the methods on it?
Cheers.....
I am guessing that "aaa/bbb/ccc/ddd/eee" is a package name. So, use aaa.bbb.ccc.ddd.eee.YourClassName. Make sure that the path of .jar must added with CLASSPATH env; variable.
__avd
Posting Genius (adatapost)
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241