|  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
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: 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-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 03:03:47 2023 UTC