Title: 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?

 

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

 

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


Reply via email to