Advertisement
Guest User

Untitled

a guest
May 18th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. PHP Java Bridge
  2.  
  3. ---------- DOWNLOAD -----------
  4. 1. Download tomcat 7.077
  5. 2. Download EasyPHP / Xampp / Wampp
  6. 3. Download JavaBridge and unpack the files / download JavaBridge.war file and save it in any folder.
  7.  
  8. -----------INSTALL EASYPHP ---------------------
  9.  
  10. 4. Install EasyPHP and test the runable.
  11.  
  12. 5. Edit php.ini ,turn on setting -> allow_url_include = On;
  13.  
  14. 6. Configure the environment variable under "PATH" by placing the setup location i.e. "C:\Program Files (x86)\EasyPHP5.2.10\php"
  15.  
  16. 7. To check the PATH variable ifworking correctly run the "command prompt" (cmd) and type this
  17.  
  18. c:\ php-cgi -v
  19. [
  20.  
  21. C:\>php-cgi -v
  22. PHP 5.2.10 (cgi-fcgi) (built: Jun 17 2009 16:16:54)
  23. Copyright (c) 1997-2009 The PHP Group
  24. Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
  25.  
  26. C:\>
  27. ]
  28. Should appear
  29.  
  30. ------- INSTALL TOMCAT 7.077 ------------------
  31.  
  32. 8. Install Tomcat 7.077
  33. - configure the tocat user on "tomcat-users.xml" file look for it under the "apache-tomcat-7.0.77\conf" folder.
  34.  
  35. <role rolename="manager-gui"/>
  36. <role rolename="admin-gui"/>
  37. <role rolename="manager-script"/>
  38. <user username="tomcat" password="tomcat" roles="manager-gui,admin-gui,manager-script"/>
  39. <user username="both" password="tomcat" roles="tomcat,role1"/>
  40. <user username="role1" password="tomcat" roles="role1"/>
  41.  
  42. 9. Run localhost:8080
  43.  
  44. 10. While the tomcat is running..
  45. go to "apache-tomcat-7.0.77\webapps" and copy paste the "JavaBridge.war" file into it.
  46.  
  47. 11 . Refresh thhe tomcat / restart the tomcat server.
  48.  
  49. 12. Go to localhost:8080/JavaBridge and you should be able to see the screen as shown.
  50.  
  51. 13. Test php with new project and index.php file by including the following code.
  52. [
  53. <?php
  54. require_once("http://localhost:8080/JavaBridge/java/Java.inc");
  55. $System = java("java.lang.System");
  56. echo $System->getProperties();
  57. ?>
  58.  
  59. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement