Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Eclipse project on a remote machine

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?

like image 897
Naveen Avatar asked Apr 20 '11 17:04

Naveen


People also ask

Does Eclipse support SSH?

Remote System Explorer is result of Eclipse Target Management team work. It support SSH, Telnet, FTP and DStore protocols.


2 Answers

  • 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.

like image 153
Pierre Avatar answered Oct 20 '22 11:10

Pierre


Target management/Remote System Explorer provides plugins to keep a remote directory in sync with your project. See http://www.eclipse.org/tm/

To run your program remotely, you would probably have to set up an External Tool launch config (from the Run>External Tools menu) and use a program like ssh to launch your java app remotely on the linux cluster.

like image 1
Paul Webster Avatar answered Oct 20 '22 11:10

Paul Webster