lundi 27 mars 2017

Get values in Php variable from a JAR

I want to get the value from a jar file in my PHP code i.e. I am calling a jar file(jartest.jar) to execute in my Php file(Demo.php). My jar file contains a class(Test.java). I have tried using exec(), system(), shell_exec() . But none of them are working

DEMO.PHP

"."HELLO JAR :----->".$output."
"; ?>

jartest.jar

public class Test {

public static void main(String args[]) {
    // TODO Auto-generated method stub

    System.out.println("In main" );
//  System.out.println("Hello Bunnu  ----->"+args[0]);
    return "Anish";

}

}




Aucun commentaire:

Enregistrer un commentaire