Java and PHP

From: Date: Fri, 09 Aug 2002 08:58:22 +0000
Subject: Java and PHP
Groups: php.windows 
Request: Send a blank email to php-windows+get-15189@lists.php.net to get a copy of this message
Hi all, I have installed the latest version of java which is j2sdk 1_4_1_0 instead of Jdk 1.1.8, PHP version 4.2.2. I tried configuring Java to work with PHP and it works once like a miracle and the next trial I still get an error below when trying to run a scrip for another time. I really don't understand why it works once and then give the erorr on subsequent trials. I also tried to call a java class from php but this one failed completely. Would anybody have any idea on how i can solve the problem? The first run I get the result below: Java version=1.4.0_01 Java vendor=Sun Microsystems Inc. OS=Windows XP 5.1 on x86 Friday, August 09, 2002 at 11:54:43 AM GMT+03:00 Subsequent runs I get error below: Fatal error: Unable to create Java Virtual Machine in c:\phpdev\www\java.php on line 2 The script is a sample script to test if php is working on well with java. Does anyone have any idea as to why I can't run the script below? <?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'm working on a windows XP. J.Opere

« previous php.windows (#15189) next »