Hola, no manejo java, pero como nadie te respondio... haber si este enlace te sirve
Integrate PHP and Java Applications with Oracle WebLogic Server and Zend Server 5.0http://www.oracle.com/technetwork/articles/dsl/oracle-java-zend-server-152557.htmlY detenete en este codigo, utiliza
System.out.println solo una sola vez quizas por eso no imprime el siguiente texto.
{
private static String[] myArray
= {"eggs",
"hamburgers",
"tomato soup",
"chicken pot pie",
"spaghetti bolognese", "ice cream", "chocolate chip cookies",
"grilled sole"};
public static void main
(String[] args
) {
System.
out.
println(m.
getMenu()); }
public static String getMenu
() {
String menu
= "Today's menu is: "; for (int i = 0; i < 3; i++) {
int r
= (int)(Math.
random() * (myArray.
length - 1)); menu += myArray[r];
if (i != 2) {
menu += ", ";
}
}
return menu;
}
}
Y mas abajo, utilizan una clase para php-java, aqui tenes mas info sobre la extension. (
http://ar2.php.net/java)<?php
// initialize custom Java class and invoke class method
$m = new Java("Menu");
echo $m->getMenu();
?>