Run Eclipse project on a remote machine

Naveen picture Naveen · Apr 20, 2011 · Viewed 32.4k times · Source

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?

Answer

Pierre picture Pierre · May 12, 2011
  • Set your project output folder to the remote folder you mounted (under Project Properties->Java Build Path).
  • Then execute external tool: ssh user@rometesite -c "java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n Main"
  • Launch in eclipse a Remote Java Application (port 4000)

see http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html for more detailed information about remote debug.