LOL, well something's going wrong anyway. I don't have a great deal of experience with PHP under Windows, but I'd suggest having a look at the exec() command. For example, this works for me:
Java program:
public class javaprog
{
public static void main(String[] args)
{
System.out.println("Printed by Java program");
System.exit(8);
}
}
PHP code:
<?
$output = array();
$return_var = 0;
exec("java javaprog", $output, $return_var);
$output_str = join($output, "\n");
echo "<pre>The output was:\n$output_str\n\n";
echo "The return value was $return_var</pre>";
?>
Obviously you have to compile the Java program first, and if you're running Windows you'll need to use java.exe (I think), and make sure that java.exe is in your path, or give its full location when you call exec().