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. |
From: <php...@li...> - 2010-08-26 12:46:02
|
Hi, > java_require('http://localhost:10088/HelloWorld.jar'); > $world = new java("HelloWorld"); > echo $world->hello(array("from PHP")); > so when i launch this,nothing displayed. I am sorry, but I cannot reproduce this problem. Your code should display "undefined function: java_require". Please follow the instructions at: http://php-java-bridge.sourceforge.net/pjb/desktop-apps.php Regards, Jost Bökemeier |
From: <php...@li...> - 2010-08-26 15:23:45
|
> The communication can be traced by starting your application with the options: java -Dphp.java.bridge.default_log_file= -Dphp.java.bridge.default_log_level=4 -jar HelloWorld.jar What are the last 10 lines from your Java log file? |
From: <php...@li...> - 2010-08-26 15:39:05
|
> when i enter the command i have this: Failed to load main-class manifest > attribute from HelloWorld.jar. Then you a probably not using the PHP/Java Bridge at all. Please follow the instructions from http://php-java-bridge.sourceforge.net/pjb/desktop-apps.php > please what do you mean by Java log file? The argument to -Dphp.java.bridge.default_log_file= |
From: <php...@li...> - 2010-08-27 08:32:37
|
Hi, > ok i'll follow it;please how can i get the MANIFEST File? the "MANIFEST.MF" file is a standard text file. You can create it with a text editor (vi, emacs, edit, wordpad or similar). Regards, Jost Bökemeier |
From: <php...@li...> - 2010-08-27 13:26:40
|
> so this code doesn't display "undefined function;java_require"because i am using > JavaBridge which is integrated in Zend Server CE. I think this says it all. You are using a different product from an other vendor (ZEND). Also you are mixing up things... you want to show a Swing Frame through a Web-Request which is not possible... the java code is executed on the server.. Where should the frame be rendered? On the administrators screen? If you just want to render some views in the webbrowser, you better stick to JavaSCRIPT and leave the javabridge alone. -- Dominik Dorn http://dominikdorn.com http://twitter.com/domdorn Tausche Deine Lernunterlagen auf http://www.studyguru.eu ! |
From: <php...@li...> - 2010-08-27 13:46:54
|
Hi Dominik, > Also you are mixing up things... you want to show a Swing Frame > through a Web-Request Not necessarily web requests, no. Both bridges can be used to control a Java desktop application (think of a Java report designer or something) through PHP scripts. The only difference is that Zend uses a binary protocol similar to PHP/Java Bridge version 1 and supports dynamic class loading through java_require(), while the PHP/Java Bridge uses an XML protocol and requires you to add all libraries to the java application class path. Regards, Jost Bökemeier |
From: <php...@li...> - 2010-08-27 15:45:15
|
Its only possible if the php process and the java process are running under the same user on the same machine and the user who should see the frame is also the user running the java + php process. An example would be if you have some swing GUI and you want to code some logic in PHP and ship the app as a whole, so no _remote_ webserver is required. You cannot show a JFrame to a _remote_ user, if thats what you want. On Fri, Aug 27, 2010 at 5:19 PM, <php...@li...> wrote: > Hi Jost Bökemeier, > so it's possible to display a swing frame with Java bridge?but how can i do > that and what changes can i make in order to do that? > thnx > > > > ________________________________ > De : "php...@li..." > <php...@li...> > À : php...@li... > Envoyé le : Ven 27 août 2010, 15h 46min 48s > Objet : Re: [Php-java-bridge-users] Re : Aide sur JavaBridge > > Hi Dominik, > > >> Also you are mixing up things... you want to show a Swing Frame >> through a Web-Request > > Not necessarily web requests, no. > > Both bridges can be used to control a Java desktop application (think > of a Java report designer or something) through PHP scripts. > > The only difference is that Zend uses a binary protocol similar to > PHP/Java Bridge version 1 and supports dynamic class loading through > java_require(), while the PHP/Java Bridge uses an XML protocol and > requires you to add all libraries to the java application class path. > > > Regards, > Jost Bökemeier > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > -- Dominik Dorn http://dominikdorn.com http://twitter.com/domdorn Tausche Deine Lernunterlagen auf http://www.studyguru.eu ! |