1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP/Java Integration

Discussion in 'PHP' started by mcharlesrk, Jan 5, 2007.

  1. #1
    Hi,

    When i add jvm.dll in my php.ini file, my sample.php throws 500 internal server error. here i have give the details about my versions and php.ini.

    I am using php 5.2.0 , pecl 5.2.0 , jdk 1.5.0_04, apache 2.2.3

    my php.ini
    -----------
    extension=php_java.dll
    [Java]
    java.class.path = "C:\php\ext\php_java.jar;
    E:\Java\jdk1.5.0_04\jre\lib;E:\Java\jdk1.5.0_04;D:\charles\projects\java"
    java.home = "E:\Java\jdk1.5.0_04"
    java.library.path="c:\php\ext;E:\Java\jdk1.5.0_04\jre\lib"
    java.library=E:\Java\jdk1.5.0_04\jre\bin\server\jvm.dll


    sample.php
    -----------
    <?php
    $system = new Java("java.lang.System");
    print "Java version=".$system->getProperty("java.version")." <br>\n";
    print "Java vendor=".$system->getProperty("java.vendor")." <p>\n\n";
    print "OS=".$system->getProperty("os.name")." ".
    $system->getProperty("os.version")." on ".
    $system->getProperty("os.arch")." <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"))."\n";
    ?>
     
    mcharlesrk, Jan 5, 2007 IP