| | |
is it possible for PHP to call API written on java ? HELP
![]() |
Hi there,
I have some problem with accessing API using PHP. Here is the story :
I use PHP as my main script on my webserver.
I want to retrieve data in database server (oversea).
The database server provides API and it's available to download.
So I download the API but dont know how to use it....
oh yes, the API is bundled in .jar file. There are example files but all of them are written in java and there are something about java rmi etc....
please help me to find a way to retrieve data from the database. can i use API? how to use it? is it possible for PHP to call API written on java
Thank you very much
I have some problem with accessing API using PHP. Here is the story :
I use PHP as my main script on my webserver.
I want to retrieve data in database server (oversea).
The database server provides API and it's available to download.
So I download the API but dont know how to use it....

oh yes, the API is bundled in .jar file. There are example files but all of them are written in java and there are something about java rmi etc....
please help me to find a way to retrieve data from the database. can i use API? how to use it? is it possible for PHP to call API written on java
Thank you very much
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.
But indeed, moving to a JSP/Servlet environment is the best option by far.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
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 .:../<API jar file> <classname>...........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 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 .:../<API jar file> <classname>...........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.....
•
•
Join Date: Jun 2009
Posts: 1
Reputation:
Solved Threads: 0
Try this link http://www.projectzero.org/zero/silv...avaBridge.html
•
•
•
•
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 .:../<API jar file> <classname>...........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.....
Failure is not fatal, but failure to change might be. - John Wooden
![]() |
Similar Threads
- learning php (PHP)
- Frame detection possible? (HTML and CSS)
- Need To Hire PHP Programmer .Net Programmers Java Programmers (Web Development Job Offers)
- How to access API using PHP?? HELP!!! (PHP)
- games programming!! in C++ (C++)
- Java Doc help (Java)
Other Threads in the Java Forum
- Previous Thread: Contd from Mouse over
- Next Thread: What is the problem of this code?
| Thread Tools | Search this Thread |
account android api applet application array arrays automation bidirectional binary birt bluetooth class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse error errors exception expand fractal game givemetehcodez graphics gui guidancer homework html ide image inetaddress inheritance integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jlabel jme jni jpanel jtextfield jtree julia linux list loop map method methods midlethttpconnection mobile mobiledevelopmentcreatejar monitoring myaggfun netbeans newbie nullpointerexception open-source oracle plazmic print problem program project property recursion ria scanner search server set sharepoint smart sms smsspam sort sourcelabs splash sql sqlite static string subclass support swing testautomation threads tree unlimited webservices windows






