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]
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:
test
Java Test
Java Test
$system = new Java("java.lang.System");
print "Java version=".$system->getProperty("java.version")." \n";
print "Java vendor=".$system->getProperty("java.vendor")." \n\n";
print "OS=".$system->getProperty("os.name")." ".
$system->getProperty("os.version")." on ".
$system->getProperty("os.arch")." \n";
$formatter = new Java("java.text.SimpleDateFormat",
", dd, 'at' h:mm:ss a ");
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,
Thanks
--
zakd
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php