如何向 Eclipse 添加 FTP 支持?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/95800/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I add FTP support to Eclipse?
提问by levhita
I'm using Eclipse PHP Development Tools. What would be the easiest way to access a file or maybe create a remote project trough FTP and maybe SSH and SFTP?.
我正在使用 Eclipse PHP 开发工具。访问文件或通过 FTP 或 SSH 和 SFTP 创建远程项目的最简单方法是什么?
回答by
Eclipse natively supports FTP and SSH. Aptana is not necessary.
Eclipse 本身支持 FTP 和 SSH。Aptana 不是必需的。
Native FTP and SSH support in Eclipse is in the "Remote System Explorer End-User Runtime" Plugin.
Eclipse 中的本机 FTP 和 SSH 支持位于“远程系统资源管理器最终用户运行时”插件中。
Install it through Eclipse itself. These instructions may vary slightly with your version of Eclipse:
通过 Eclipse 本身安装它。这些说明可能会因您的 Eclipse 版本而略有不同:
- Go to 'Help' -> 'Install New Software' (in older Eclipses, this is called something a bit different)
- In the 'Work with:' drop-down, select your version's plugin release site. Example: for Kepler, this is
Kepler - http://download.eclipse.org/releases/kepler - In the filter field, type 'remote'.
- Check the box next to 'Remote System Explorer End-User Runtime'
- Click 'Next', and accept the terms. It should now download and install.
- After install, Eclipse may want to restart.
- 转到“帮助”->“安装新软件”(在较旧的 Eclipse 中,这被称为有点不同的东西)
- 在“使用:”下拉列表中,选择您版本的插件发布站点。示例:对于开普勒,这是
开普勒 - http://download.eclipse.org/releases/kepler - 在过滤器字段中,输入“远程”。
- 选中“远程系统资源管理器最终用户运行时”旁边的框
- 单击“下一步”,并接受条款。它现在应该下载并安装。
- 安装后,Eclipse 可能需要重新启动。
Using it, in Eclipse:
在 Eclipse 中使用它:
- Window -> Open Perspective -> (perhaps select 'Other') -> Remote System Explorer
- File -> New -> Other -> Remote System Explorer (folder) -> Connection (or type Connection into the filter field)
- Choose FTP from the 'Select Remote System Type' panel.
- Fill in your FTP host info in the next panel (username and password come later).
- In the Remote Systems panel, right-click the hostname and click 'connect'.
- Enter username + password and you're good!
- Well, not exactly 'good'. The RSE system is fairly unusual, but you're connected.
- And you're one smart cookie! You'll figure out the rest.
- 窗口 -> 打开透视图 ->(也许选择“其他”) -> 远程系统资源管理器
- 文件 -> 新建 -> 其他 -> 远程系统资源管理器(文件夹)-> 连接(或在过滤器字段中键入连接)
- 从“选择远程系统类型”面板中选择 FTP。
- 在下一个面板中填写您的 FTP 主机信息(用户名和密码稍后出现)。
- 在“远程系统”面板中,右键单击主机名并单击“连接”。
- 输入用户名+密码,你很好!
- 嗯,不完全是“好”。RSE 系统相当不寻常,但您已连接。
- 你是一个聪明的饼干!你会弄清楚剩下的。
Edit:To change the default port, follow the instructions on this page: http://ikool.wordpress.com/2008/07/25/tips-to-access-ftpssh-on-different-ports-using-eclipse-rse/
编辑:要更改默认端口,请按照此页面上的说明进行操作:http: //ikool.wordpress.com/2008/07/25/tips-to-access-ftpssh-on-different-ports-using-eclipse-rse /
回答by Hendy Irawan
Install Aptana pluginto your Eclipse installation.
将Aptana 插件安装到 Eclipse 安装中。
It has built-in FTP support, and it works excellently.
它具有内置的 FTP 支持,并且运行良好。
You can:
你可以:
- Edit files directly from the FTP server
- Perform file/folder management (copy, delete, move, rename, etc.)
- Upload/download files to/from FTP server
- Synchronize local files with FTP server. You can make several profiles (actually projects) for this so you won't have to reinput over and over again.
- 直接从 FTP 服务器编辑文件
- 执行文件/文件夹管理(复制、删除、移动、重命名等)
- 向/从FTP服务器上传/下载文件
- 将本地文件与 FTP 服务器同步。您可以为此制作多个配置文件(实际上是项目),这样您就不必一遍又一遍地重新输入。
As a matter of fact the FTP support is so good I'm using Aptana (or Eclipse + Aptana) now for all my FTP needs. Plus I get syntax highlighting/whatever coding support there is. Granted, Eclipse is not the speediest app to launch, but it doesn't bug me so much.
事实上,FTP 支持非常好,我现在使用 Aptana(或 Eclipse + Aptana)来满足我所有的 FTP 需求。另外,我得到了语法高亮/任何编码支持。诚然,Eclipse 并不是启动速度最快的应用程序,但它并没有给我带来太多麻烦。
回答by PW.
have you checked RSE(Remote System Explorer) ? I think it's pretty close to what you want to achieve.
你检查RSE([R表情小号ystem ËXPLORER)?我认为这与您想要实现的目标非常接近。
回答by Internet Friend
I'm not sure if this works for you, but when I do small solo PHP projects with Eclipse, the first thing I set up is an Ant script for deploying the project to a remote testing environment. I code away locally, and whenever I want to test it, I just hit the shortcut which updates the remote site.
我不确定这是否适合您,但是当我使用 Eclipse 进行小型独立 PHP 项目时,我设置的第一件事是用于将项目部署到远程测试环境的 Ant 脚本。我在本地编写代码,每当我想测试它时,我只需点击更新远程站点的快捷方式。
Eclipse has good Ant support out of the box, and the scripts aren't hard to make.
Eclipse 具有很好的开箱即用的 Ant 支持,并且脚本不难制作。
回答by Internet Friend
SFTP Plug-in: http://www.jcraft.com/eclipse-sftp/:)
SFTP 插件:http: //www.jcraft.com/eclipse-sftp/:)
回答by x-ray
As none of the other solutions mentioned satisfied me, I wrote a script that uses WinSCP to sync local directories in a project to a FTP(S)/SFTP/SCP Server when eclipse's autobuild feature is triggered. Obviously, this is a Windows-only solution.
由于提到的其他解决方案都没有让我满意,因此我编写了一个脚本,当 eclipse 的自动构建功能被触发时,它使用 WinSCP 将项目中的本地目录同步到 FTP(S)/SFTP/SCP 服务器。显然,这是一个仅限 Windows 的解决方案。
Maybe someone finds this useful: http://rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/
也许有人觉得这很有用:http: //rays-blog.de/2012/05/05/94/use-winscp-to-upload-files-using-eclipses-autobuild-feature/