Do I need a Java Application Server or Servlet Engine?
Yes, Java needs an execution environment. Experienced users may use the execution environment built into JavaBridge.jar, see java -jar JavaBridge.jar –help for help. You can also add PHP support to your standalone Java application by adding the following line to its main class: static final php.java.bridge.JavaBridgeRunner runner = php.java.bridge.JavaBridgeRunner.getInstance(8087); The above code opens the port 8087, so that local PHP scripts can call methods/procedures from your Java application, as long as your Java application is running. The third option is the standard JSR 223 script interface, which allows one to execute PHP code/scripts from Java applications.