tomcat - How to call a Java method in PHP using php JavaBridge? -


i beginner. want call java method php. using apache tomcat server , java-bridge. have helo.java , class file in sample.php trying call method java file.

helo.java

public class helo    {     public static void main(string[] args)        {           system.out.println("hellooo");           helo = new helo();           a.show();       }      public static void show()      {          system.out.println("java function");      }             } 

sample.php

<?php      require_once("java/java.inc");     $obj = java("helo");     echo $obj; // prints 'class helo'             $obj->show(); // here error  .... ?> 

error:- http status 500 - java.lang.runtimeexception: php fatal error: uncaught [[o:exception]:"java.lang.exception: invoke failed: [[c:helo]]->show. cause: php.java.bridge.nosuchprocedureexception: static show().

please me stuck this. thank you.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -