Eclipse PDT 安装
我有一个项目打算使用一些 PHP 以及 Java 和 Javascript,因此我使用“安装新软件”菜单选项安装了适用于 Eclipse 的 PDT PHP 插件。 现在 Eclipse 同意安装 PDT,但任何地方都没有出现创建或编辑 PHP 文件等 PHP 功能。 我还需要做些什么来激活 PDT 吗? (我确实按照它所说的需要重新启动了 Eclipse。)
I have a project that's intended to use some PHP as well as Java and Javascript, so I installed the PDT PHP plug-in for Eclipse, using the Install New Software menu option. Now Eclipse agrees PDT is installed, but no PHP features like creating or editing PHP files are appearing anywhere. Is there something else I need to do to activate PDT? (I did restart Eclipse like it said I needed to.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
右键单击您的项目,配置(位于列表底部)->添加 PHP 支持...
完成后,您应该在项目图标中看到一个小 P 符号。
Right click on your project, Configure (it's at the bottom of the list)->Add PHP Support...
After it's done, you should see a little P symbol in the project's icon.
只需使用向导创建新项目,然后选择 PHP 即可。 当Eclipse知道你的项目实际上是基于PHP的之后,它会向你展示所有的功能。
如果您有现有项目,只需打开 PHP 透视图。
Just create new project using the wizard, and choose PHP one. After Eclipse will know that your project is actually based on PHP, it will show you all the features.
In case if you have existing project, just open the PHP perspective.
我曾经遇到过类似的问题。 Eclipse 正在使用 JRE 1.4 运行,并且似乎需要 JRE 1.5 或更高版本才能运行 PDT。 我切换到 Java 1.6,问题就解决了。
I've once had a similar problem. Eclipse was running with the JRE 1.4, and it seems the JRE 1.5 or later is required to run the PDT. I switched to Java 1.6 and that solved the problem.
我有时使用 eclipse 插件会遇到这个问题。
您是否尝试过卸载它,删除 jar 并将其从 eclipse/plugins 和 eclipse/features 中归档,然后再次安装?
如果你不想这样做。 尝试将其安装在一个干净的 Eclipse 实例中,如果它有效,那么这只是 Eclipse 的配置问题。
您可能还没有安装所有工具。
I run into this sometimes with eclipse plugins.
Have you tried uninstalling it, removing the jar and files it from eclipse/plugins and eclipse/features, then installing it again?
If you don't feel like doing that. Try installing it in a clean eclipse instance and if it works then it's just a config issue with eclipse.
You might have not installed all of the tools too.
我最终想出的解决方案是只安装 Aptana Studio,这是一个基于 Eclipse 的 PHP IDE,其独立版本可以与常规 Eclipse 在同一台机器上愉快地共存。
The solution I eventually came up with was to just install Aptana Studio, a PHP IDE based on Eclipse, whose standalone version can coexist happily with the regular Eclipse on the same machine.
为了在 eclipse 项目中获得 PHP 支持,您需要将 PHPNature 添加到项目中。 它是eclipse项目的一种配置参数。 当您使用向导创建新的 PHP 项目时,请检查新项目目录中的 .project 文件。 有一条 PHPNature 线。 将此行复制到 java 项目的 .project 中。
另一种解决方案是将 java 和 php 代码分离在不同的项目中,每个项目都由正确的向导创建。
In order to have PHP support in eclipse project, you need to add PHPNature to the project. It's a kind of configuration paramter of eclipse project. When you craete a new PHP project using a wizard, check the .project file in a new project directory. There is a PHPNature line. Copy this line into .project of your java project.
Another solution is to separate java and php code in a different projects, each one craeted by right wizard.