Hi all,
Iam using Redhat 7.2 linux OS and php4.0 is configured with apache
I have java installed in /usr/java/jdk1.3
My php.ini settings are like this:
java.class.path = /usr/java/jdk1.3/bin
java.home = /usr/java/jdk1.3
java.library = /usr/java/jdk1.3/jre/bin/i386/native_threads/java_vm
java.library.path = .\
Is anything wrong with this?
Iam trying to use java with php
I am using this sample code:
<?php
$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";
?>
I have named this as test.php
when i run this script i get the following error:
Fatal error: Cannot instantiate non-existent class: java in test.php on line 3
WHAT COULD BE THE MISTAKE?
PLEASE LET ME KNOW HOW TO GO AHEAD?
REGARDS
ROOPA