title: How to call jar files from PHP?
body: <p>I know this question is not new but I am posting this after going through enough googling around.</p>
  
  <p>I have a jar file which I don't control. I mean I have not written the Java class in there and all I know is that there is a class named "hist" in it which takes two arrays and gives out the output. Now I have to use PHP to call this class "hist" in the jar file named "histvol.jar". I have installed the PHP/Java Bridge and it is installed correctly.<br>
  But I don't understand how to call this jar file in PHP and where to place this jar file.</p>
  
  <p>This is what I did:</p>
  
  <ol>
  <li>Installed tomcat and php-javabridge</li>
  <li>Placed the jarfile "histvol.jar" under Tomcat/webapps/JavaBridgeTemplate621/webinf/lib/</li>
  <li>Went to xampp/htdocs and created a file named testjava.php</li>
  </ol>
  
  <p></p>
  
  <pre><code>&lt;?php  
  require_once("http://localhost:8080/JavaBridgeTemplate621/java/Java.inc");  
  $System = java("java.lang.System");  
  $myclass=java("histvol");  
  echo $System-&gt;getProperties();  
  ?&gt;
  </code></pre>
  
  <p><code>Class not found</code> exception is expected because I am not calling it anywhere in PHP, but how do I call it?<br>
  I am lost, please help (I don't know a word of Java).</p>