From: <php...@li...> - 2010-08-25 10:17:14
|
Hi everyone, i am working on a PHP application ,i need to introduce a .jar ,so my JavaBridge turn well with some examples,but when i tried the example in the site which concern the message dialogue,that doesn't work. So it doesn't display a message dialog,below are all the codes i used: ***************HelloWorld.java***************** import javax.swing.JOptionPane; public class HelloWorld { public static void main(String args[]) throws Exception { JOptionPane.showMessageDialog(null, "hello world"); System.exit(0); } public void hello(String args[]) throws Exception { JOptionPane.showMessageDialog(null, "hello " + args[0]); } } so i created the HelloWorld.jar,and it's worked,so below is the PHP code: ************************* <?php java_require('http://localhost:10088/HelloWorld.jar'); $world = new java("HelloWorld"); echo $world->hello(array("from PHP")); ?> so when i launch this,nothing displayed. Please really need someone for help. |