Run a jar called from php?

0

I want to call a jar that receives parameters for electronic signature, I want to do it from php, in localhost it's great, I have a hosting with tomcat support with JVM Shared, I upload it in the same way I have in local and it does not do anything, restore the tomcat service and place the jar inside web-inf and all the libraries (jar) that they need but I can not run it either.

In php I've called it with shell_exec (), also with exec () but I can not get the jar to run.

This is the function that receives the jar of main

XAdESBESSignature.firmar(xmlPath, pathSignature, passSignature, pathOut, nameFileOut);

Use libraries MITyCLibAPI-1.1.7, MITyCLibCert-1.1.7, MITyCLibCrypt-1.1.7, MITyCLibOCSP-1.1.7, MITyCLibPolicy-1.1.7, MITyCLibTrust-1.1.7, MITyCLibTSA-1.1.7, MITyCLibXADES-1.1 .7.

This is my PHP code

  if (function_exists("exec")) {
    echo "enable <br>";
  }else{
   echo "disable <br>";
  }
  $output = shell_exec("java -version 2>&1");
  echo "<strong>Java Version Before Setting Environmental Variable</strong>";
  echo "<hr/>";
  echo "$output";
  var_dump( exec("java -jar sri_firma.jar 222.xml firma.p12 clave facDan.xml", 
  $output));

Some ideas that I may be doing wrong.

    
asked by Alldesign Web 09.02.2018 в 00:44
source

0 answers