PHP/Java Eclipse
我在 Eclipse 中创建了一个 Java 项目,该项目包含具有 Java 视角的小程序,以及另一个具有 PHP 视角的 PHP 项目,该项目包含具有与 java 小程序通信的 javascript 的文件。 不幸的是,我不知道如何将 Java 文件设置到 PHP 项目中,以便小程序可以从我的本地主机运行。
当我将 PHP 文件放入 Java 项目并像这样运行它时,我的小程序有点工作,但我需要其他方式,以便我可以从我的 PHP 项目运行。一切都很棒。谢谢
I've created a Java project in Eclipse that holds applet with Java perspective and another PHP project with PHP perspective that holds file that has javascript to communicate with the java applet.
Unfortunately I don't know how to setup the Java files into the PHP project so that the applet works from my localhost.
I had the applet somewhat working when I put the PHP files into Java project and ran it like that but I need it other way so that I can run from my PHP project.Anything is great. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让您的 Java 和 PHP 项目完全分开。请记住,您可以通过多种方式提供 Java 小程序,PHP 实现只是其中一种。掌握了这些知识后,您真正想做的就是决定 Applet 包的存放位置。我建议您在服务器上创建一个简单的 HTML 文件,并测试从您决定的任何位置加载小程序。然后在您的 PHP 文件中只需编写代码即可向客户端输出完全相同的 HTML。
Keep your Java and PHP projects completely separate. Keep in mind that you can serve up your Java applet in any number of ways, your PHP implementation is just one. With that knowledge in hand what you really want to do is to decide where your Applet bundle is going to live. I recommend you create a simple HTML file on your server and test loading the applet from whatever location you decide on. Then in your PHP file just write code to spit out the exact same HTML to the client.
将 PHP 文件放入 Java 项目...错误的方式!
尝试使用其他工具来编辑 PHP 脚本。为开发环境设置XAMPP服务器。
put the PHP files into Java project ... wrong way!
Try using another tool to edit your PHP scripts. Setup XAMPP server for development environment.