|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31336 Instanciating a java object using: new Java("...") gives an access violation
Submitted: 2004-12-29 18:01 UTC Modified: 2004-12-31 11:00 UTC
From: thx1011 at yahoo dot com Assigned:
Status: Closed Package: Java related
PHP Version: 5.0.3 OS: Win XP Pro SP1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: thx1011 at yahoo dot com
New email:
PHP Version: OS:


 [2004-12-29 18:01 UTC] thx1011 at yahoo dot com
Configured Apache 2.0.51+PHP 5.0.3+JVM 1.4.2-b28 on Win XP pro sp1 (development machine)
Try to run simple sample.
Always have a crash with access violation on php.exe (running from command line) or running from Apache.

Already double checked all configuration. JVM seams to load fine (using filemon from sysinternals).

Already used jre from SDK with same results and using the client and server jvm.dll

From Apache already tried to run as a SAPI and CGI module. 
But running PHP in standalone mode gives the error, so it's not apache related.

Reproduce code:
<!doctype html public "-//W3C//DTD HTML 4.01//EN">


      <title>Java test</title>
      <meta http-equiv="generator" content="PHP Designer 2005" />

   <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">


 $system = new Java("java.lang.System");

 echo "Java version: " . $system->getProperty('java.version') . "<BR><BR>";




Expected result:
A page with "JAva version: 1.4.2-b28"

Actual result:
Nothing. Just the first HTML lines, before instatianing the Java class.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-29 18:09 UTC] thx1011 at yahoo dot com
Also I've already tried the latest snapshot of PHP with the same results.

My PHP.ini entries:

 [2004-12-31 11:00 UTC] thx1011 at yahoo dot com
It's simpler to use Tomcat and Apache Axis to build web services and then use PHP soap API to call the Java interface.

Much, much cleaner.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jan 26 09:03:33 2022 UTC