I am trying to configue PHP with Java support.
with PHP-4.1.2, JDK1.3.1_01

The installation goes smoothly. My php.ini file 
contains the follwing section for Java


java.class.path = /usr/local/src/php-4.1.2/ext/java/php_java.jar
java.home = /usr/local/jdk1.3.1_01
java.library = /usr/local/jdk1.3.1_01/jre/lib/i386/server/libjvm.so
;java.library.path = .\
extension_dir = /usr/lib/php4
extension = libphp_java.so


phpinfo() function output shows me Java section OK.
BUT, when I run a simple example from 'ext/java/jver.php'
(available with PHP distribution), Netscape gives me an 
error box with a message:

"The document contained no data.
Try again later or contact the server's administrator."

Here's the code for jver.php I'm trying to run:

<h1>Java Test</h1>
// ---- if this part is commented out ------- //
// ---- the scritp displays <h1>Java Test</h1>
  $system = new Java("java.lang.System");
  print "Java version=".$system->getProperty("java.version")." <br>\n";
  print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
  print "OS=".$system->getProperty("os.name")." ".
              $system->getProperty("os.version")." on ".
              $system->getProperty("os.arch")." <br>\n";

  $formatter = new Java("java.text.SimpleDateFormat",
                        "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");

  print $formatter->format(new Java("java.util.Date"))."\n";
// ----------------------------------------- */


Obviously, there's somthing still wrong with PHP/Java configuration
Anybody has the same problem?  Any suggestions?

Any help is appreciated,


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to