|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-03-07 10:43 UTC] albaity at hotmail dot com
Description:
------------
try this code on 4.3.10 is work :
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
print 'Java version='.$system->getProperty('java.version').' <br>';
print 'Java vendor=' .$system->getProperty('java.vendor').' <br>';
print 'OS='.$system->getProperty('os.name').' '.
$system->getProperty('os.version').' on '.
$system->getProperty('os.arch').' <br>';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
print $formatter->format(new Java('java.util.Date'));
?>
but with php5.0.3 is not work .
Reproduce code:
---------------
windows give me 2 message to terminate program because of memory crash .
Expected result:
----------------
give me the date
Actual result:
--------------
nothing CGI HEADERS NOT SEND IIS 5.5
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
this the result must appear : Java version=1.4.2_05 Java vendor=Sun Microsystems Inc. OS=Windows XP 5.1 on x86 ???????, ???? 07, 2005 at 10:08:00 ? Arabia Standard Time ----------------------------------------------------------- this is the code that I am test : <?php // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // demonstrate property access print 'Java version='.$system->getProperty('java.version').' <br>'; print 'Java vendor=' .$system->getProperty('java.vendor').' <br>'; print 'OS='.$system->getProperty('os.name').' '. $system->getProperty('os.version').' on '. $system->getProperty('os.arch').' <br>'; // java.util.Date example $formatter = new Java('java.text.SimpleDateFormat', "EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"); print $formatter->format(new Java('java.util.Date')); ?> --------------------------------------------------------- this is my php.ini setting which work with me with 4.3.10 : java.class.path = "C:\PHP\ext\php_java.jar;C:\PHP\ext\itext.jar" java.home = "C:\j2sdk\jre\" java.library = "c:\j2sdk\jre\bin\server\jvm.dll " java.library.path = "C:\PHP\ext\" ---------------------------------------------------- What I get : 2 windows give me this message : the instruction at "0x7c918fea" referennced memory at "0x00000010" the memory could not be "written"