PHP/Java Eclipse [英] PHP/Java Eclipse

查看:22
本文介绍了PHP/Java Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Eclipse 中创建了一个 Java 项目,其中包含带有 Java 透视图的小程序,以及另一个带有 PHP 透视图的 PHP 项目,其中包含具有用于与 Java 小程序通信的 javascript 的文件.不幸的是,我不知道如何将 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.

当我将 PHP 文件放入 Java 项目并像这样运行时,我的小程序有点工作,但我需要其他方式,以便我可以从我的 PHP 项目中运行.任何东西都很棒.谢谢

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

推荐答案

让您的 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 Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆