Run Eclipse project on a remote machine

前端 未结 4 1090
攒了一身酷
攒了一身酷 2020-12-24 12:27

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

相关标签:
4条回答
  • 2020-12-24 12:59

    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.

    0 讨论(0)
  • 2020-12-24 13:08

    Here is a great tutorial to do it : http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fpreferences%2Fjava%2Fdebug%2Fref-execution_environments.htm and this one is usefull too : http://java.dzone.com/articles/how-debug-remote-java-applicat

    0 讨论(0)
  • 2020-12-24 13:09

    This sounds like a great situation for a continuous integration solution. Have you considered setting up CruiseControl? I realize that might seem like overkill if you're just a single developer working on something. And if you don't want to move a JAR file over to the remote machine you probably won't be up for this either.

    But continuous integration is worth the trouble once it's set up. Beyond the automated deployment (which is what you're asking for here) you'll get a debug/test environment that everyone in your group can use. Plus it forces you to solve the packaging/deployment problems up front which, while not fun, gets you one big step closer towards a truly iterative development process.

    0 讨论(0)
  • 2020-12-24 13:19
    • 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.

    0 讨论(0)
提交回复
热议问题