I have Java1.2 , php4.1.1 and apache 1.3.22, sun solaris7
I did compile php with-java
1) Java section in php.ini
[Java]
java.home = /usr/java1.2
java.class.path = /usr/local/lib/php/php_java.jar
java.library=/usr/java1.2/jre/lib/sparc/libjvm.so
java.library.path = /usr/local/lib/php
2) prueba.php
<html>
<body>
<?
$system = new Java();
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";
?>
<html>
the error in browser is:
Fatal error: Cannot instantiate non-existent class: java in
/usr/local/apache/htdocs/remotemanager/users/java.php on line 4
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php