PHP AND JAVA
Posted: Wed Aug 16, 2006 5:23 pm
feyd | Please use
The "java.library" entry in my php.ini file bombs my apache server.
javatest.php
If anyone has this working I'd appreciate any help.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have tried to install php java components, but no luck I have tried both j2sdk1.4.2_12 as well as jdk1.1.8 and no luck!
php.iniCode: Select all
[Java]
java.library.path = "C:\php\ext"
java.class.path = "C:\php\ext\php_java.jar"
java.home = "C:\jdk1.1.8\bin"
java.library = "C:\j2sdk1.4.2_12\jre\bin\server\jvm.dll"javatest.php
Code: Select all
<?php
$system_inst = new Java('java.lang.System');
// Test PHP's ability to get a property from a Java class
echo "The version of Java running is" . $system_inst->getProperty("java.version") ;
?>
<?php
$systemInfo = new Java("java.lang.System");
print "Total seconds since January 1, 1970:
".$systemInfo->currentTimeMillis();
?>If anyone has this working I'd appreciate any help.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]