From: <php...@li...> - 2012-06-14 04:29:59
|
I've installed PHP/Java Bridge on my PC using it as a test environment. I've got WAMPSERVER installed on my PC and have Apache Tomcat running as a service already but can't seem to get my TestInstallation (java -classpath JavaBridge.war TestInstallation) to work. What have missed out in the installation? I've tried looking around for detailed step by step guide for installing the PHP/Java Bridge but have not been able to find it. Is there anything that I need to change in my php.ini file or my httpd.conf file? Appreciate if someone can provide me some guidance. Thanks. I am getting the following output when I run "java -classpath JavaBridge.war TestInstallation": Starting a simple servlet engine: [C:\Program Files\Java\jre7\bin\java, -jar, c: \wamp\www\ext\JavaBridge.jar, SERVLET_LOCAL:8081] Jun 14 11:21:21 JavaBridge INFO : VM : 1.7.0_04@http://java.ora cle.com/ Jun 14 11:21:21 JavaBridge INFO : JavaBridge version : 6.2.1 Jun 14 11:21:21 JavaBridge INFO : logFile : Jun 14 11:21:21 JavaBridge INFO : default logLevel : 3 Jun 14 11:21:21 JavaBridge INFO : socket : SERVLET_LOCAL:8081 Jun 14 11:21:21 JavaBridge INFO : java.ext.dirs : C:\Program Files\Java\jr e7\lib\ext;C:\Windows\Sun\Java\lib\ext Jun 14 11:21:21 JavaBridge INFO : php.java.bridge.base: C:\Users\aw4552 Jun 14 11:21:21 JavaBridge INFO : thread pool size : 20 Jun 14 11:21:21 JavaBridge INFO : JavaBridgeRunner started on port INET_LOCAL:80 81 Invoking php: [php-cgi, -n, -d, allow_url_include=On, c:\wamp\www\test.php] java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, allow_url_inclu de=On, c:\wamp\www\test.php]), please check if php-cgi is in the path. at TestInstallation.start(TestInstallation.java:332) at TestInstallation.main(TestInstallation.java:252) Caused by: java.io.IOException: Cannot run program "php-cgi": CreateProcess erro r=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at TestInstallation.start(TestInstallation.java:330) ... 1 more Caused by: java.io.IOException: CreateProcess error=2, The system cannot find th e file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more |
From: <php...@li...> - 2012-06-14 13:30:20
|
You shouldn't use Testinstallation when running Tomcat, or really invoke Java on your own at all. Copy the .war file out to your Tomcat deployment path and make sure Tomcat's running - the deployment folder is usually called "webapps". That's all there is to it. For future reference, the query "tomcat deploy war file" will get you much further along your path than any mailing list. Thanks, Brandon On Thu, Jun 14, 2012 at 12:30 AM, < php...@li...> wrote: > I've installed PHP/Java Bridge on my PC using it as a test environment. > I've got WAMPSERVER installed on my PC and have Apache Tomcat running as a > service already but can't seem to get my TestInstallation (java -classpath > JavaBridge.war TestInstallation) to work. What have missed out in the > installation? I've tried looking around for detailed step by step guide > for installing the PHP/Java Bridge but have not been able to find it. Is > there anything that I need to change in my php.ini file or my httpd.conf > file? Appreciate if someone can provide me some guidance. Thanks. > > I am getting the following output when I run "java -classpath > JavaBridge.war TestInstallation": > Starting a simple servlet engine: [C:\Program Files\Java\jre7\bin\java, > -jar, c: > \wamp\www\ext\JavaBridge.jar, SERVLET_LOCAL:8081] > Jun 14 11:21:21 JavaBridge INFO : VM : > 1.7.0_04@http://java.ora > cle.com/ > Jun 14 11:21:21 JavaBridge INFO : JavaBridge version : 6.2.1 > Jun 14 11:21:21 JavaBridge INFO : logFile : > Jun 14 11:21:21 JavaBridge INFO : default logLevel : 3 > Jun 14 11:21:21 JavaBridge INFO : socket : SERVLET_LOCAL:8081 > Jun 14 11:21:21 JavaBridge INFO : java.ext.dirs : C:\Program > Files\Java\jr > e7\lib\ext;C:\Windows\Sun\Java\lib\ext > Jun 14 11:21:21 JavaBridge INFO : php.java.bridge.base: C:\Users\aw4552 > Jun 14 11:21:21 JavaBridge INFO : thread pool size : 20 > Jun 14 11:21:21 JavaBridge INFO : JavaBridgeRunner started on port > INET_LOCAL:80 > 81 > Invoking php: [php-cgi, -n, -d, allow_url_include=On, > c:\wamp\www\test.php] > java.lang.RuntimeException: Could not run PHP ([php-cgi, -n, -d, > allow_url_inclu > de=On, c:\wamp\www\test.php]), please check if php-cgi is in the path. > at TestInstallation.start(TestInstallation.java:332) > at TestInstallation.main(TestInstallation.java:252) > Caused by: java.io.IOException: Cannot run program "php-cgi": > CreateProcess erro > r=2, The system cannot find the file specified > at java.lang.ProcessBuilder.start(Unknown Source) > at java.lang.Runtime.exec(Unknown Source) > at java.lang.Runtime.exec(Unknown Source) > at TestInstallation.start(TestInstallation.java:330) > ... 1 more > Caused by: java.io.IOException: CreateProcess error=2, The system cannot > find th > e file specified > at java.lang.ProcessImpl.create(Native Method) > at java.lang.ProcessImpl.<init>(Unknown Source) > at java.lang.ProcessImpl.start(Unknown Source) > ... 5 more > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |