Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PHP Java Bridge
- ---------- DOWNLOAD -----------
- 1. Download tomcat 7.077
- 2. Download EasyPHP / Xampp / Wampp
- 3. Download JavaBridge and unpack the files / download JavaBridge.war file and save it in any folder.
- -----------INSTALL EASYPHP ---------------------
- 4. Install EasyPHP and test the runable.
- 5. Edit php.ini ,turn on setting -> allow_url_include = On;
- 6. Configure the environment variable under "PATH" by placing the setup location i.e. "C:\Program Files (x86)\EasyPHP5.2.10\php"
- 7. To check the PATH variable ifworking correctly run the "command prompt" (cmd) and type this
- c:\ php-cgi -v
- [
- C:\>php-cgi -v
- PHP 5.2.10 (cgi-fcgi) (built: Jun 17 2009 16:16:54)
- Copyright (c) 1997-2009 The PHP Group
- Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
- C:\>
- ]
- Should appear
- ------- INSTALL TOMCAT 7.077 ------------------
- 8. Install Tomcat 7.077
- - configure the tocat user on "tomcat-users.xml" file look for it under the "apache-tomcat-7.0.77\conf" folder.
- <role rolename="manager-gui"/>
- <role rolename="admin-gui"/>
- <role rolename="manager-script"/>
- <user username="tomcat" password="tomcat" roles="manager-gui,admin-gui,manager-script"/>
- <user username="both" password="tomcat" roles="tomcat,role1"/>
- <user username="role1" password="tomcat" roles="role1"/>
- 9. Run localhost:8080
- 10. While the tomcat is running..
- go to "apache-tomcat-7.0.77\webapps" and copy paste the "JavaBridge.war" file into it.
- 11 . Refresh thhe tomcat / restart the tomcat server.
- 12. Go to localhost:8080/JavaBridge and you should be able to see the screen as shown.
- 13. Test php with new project and index.php file by including the following code.
- [
- <?php
- require_once("http://localhost:8080/JavaBridge/java/Java.inc");
- $System = java("java.lang.System");
- echo $System->getProperties();
- ?>
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement