Menu

Pass location of Java binaries as an argument?

Help
2013-09-02
2013-09-02
  • Darren Wheatley

    Darren Wheatley - 2013-09-02

    Hi,

    I'm trying to install my app on a shared server that while it has Java installed, doesn't have JAVA_HOME set, or the Java binaries on the active PATH.

    I need to run the XSLT2_Processor via the CLI, but it doesn't work as it can't find Java.

    Is there a way I can pass the location of the Java binaries to the XSLT2_Processor?

    Regards

    Darren.

     
  • boen_robot

    boen_robot - 2013-09-02

    Yes.

    As a second argument, instead of passing a single string, pass an associative array like the following:

    $proc = new XSLT2Processor(
        'SAXON',
        array(
            'runtime' => '/path/to/java',
            'processor' => '/path/to/saxon.jar'
        ),
        'JAVA-CLI'
    );
    
     

Log in to post a comment.