在远程机器上运行 Eclipse 项目
我一直在使用 Eclipse 在我的本地机器上处理一个 Java 项目.我正在尝试在远程机器上运行它.远程机器是在 Linux 上运行的集群.现在我已经挂载了远程驱动器并通过 Eclipse 编辑了远程文件副本.但是,我正在寻找更强大的东西.有没有办法通过 Eclipse 无缝地做到这一点,即每次我运行项目时,它都在远程机器上运行?
I have been working on a Java project from my local machine using Eclipse. I am trying to run this on a remote machine. The remote machine is a cluster running on Linux. Right now I have mounted the remote drive and edit the remote file copy through Eclipse. However, I was looking something more robust. Is there any way to do this seamlessly through Eclipse, i.e. each time I run the project, it runs on the remote machine?
推荐答案
- 将您的项目输出文件夹设置为您挂载的远程文件夹(在项目属性->Java 构建路径下).
- 然后执行外部工具:ssh user@rometesite -c "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n Main"
- 在 Eclipse 中启动远程 Java 应用程序(端口 4000)
请参阅 http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html 了解有关远程调试的更多详细信息.
see http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html for more detailed information about remote debug.
相关文章