|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9897 scripts fail with error "Fatal error: Unable to create Java Virtual Machine"
Submitted: 2001-03-21 06:09 UTC Modified: 2001-06-01 16:09 UTC
From: robin at xs dot mw Assigned:
Status: Closed Package: Java related
PHP Version: 4.0.4pl1 OS: Win98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: robin at xs dot mw
New email:
PHP Version: OS:


 [2001-03-21 06:09 UTC] robin at xs dot mw
The following:

  $system = new Java("java.lang.System");
  print("Java version: " .  $system->getProperty("java.version") .  "<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")) . "<BR>\n");

produces the error "Unable to create Java Virtual Machine in xyz.php on line XX" under PHP 4.0.5RC1 as well as the latest 4.0.4 off the site.

my php.ini section is:

java.library.path = "C:\Inetpub\php\extensions;C:\Inetpub\jdk-1.3\jre\bin;C:\Inetpub\jdk-1.3\jre\lib;C:\Inetpub\jdk-1.3\lib"
java.library = C:\Inetpub\jdk-1.3\jre\bin\classic\jvm.dll
java.class.path = "C:\Inetpub\php\extensions\php_java.jar"
java.home = "C:\Inetpub\jdk-1.3\bin;C:\Inetpub\jdk-1.3\jre\bin;C:\Inetpub\jdk-1.3\jre\lib;C:\Inetpub\jdk-1.3\lib"

Im using J2SDK 1.3

The script actually works the first few times (the ammount of times varies) but then continuously fails. I've seen numerous reports of people with the same problem on

Installing an another machine with the same config, reproduces the same error.

It also appears to be somewhat related to bug # 6617 ( and # 6925 (

Are there any plans to tackle these issues?



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-16 06:53 UTC]
Does this happen after the creation of the third JVM??

 [2001-05-10 05:49 UTC]
Are you planning on answering?

 [2001-06-01 16:09 UTC]
No feedback and there are lot of bug reports about this 
already anyway.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 27 15:04:44 2023 UTC