Search code examples
javaeclipseremote-debugging

Is there an easy(read:lazy) way to push code to other machines in java?


I'm pretty green when it comes to java and am playing around with hadoop but I'm finding I am spending so much time pushing code between systems and was wondering if there was an easier way(in python, it was easier because I could just copy/paste the code into the remote systems VI editor with Java, I can't seem to pack all my code into a single large file and thus have to copy/paste many different files).

I do not want to install hadoop locally so I setup an ec2 instance with it but as I write code in eclipse I find myself having to export to a jar, then ftping it, then waiting to run it. I notice a few bugs and repeat this process several times as I make tweaks. I switched to using git(push code from my workstation then pull it on remote system) but I often have to write some message related to the change which is annoying. I am about to write a script to do this but I wanted to ask before I reinvent the wheel. Is there a way within eclipse or something else I can do to make it as easy as when I hit the 'run' button and it saves/compiles/runs my code?


Solution

  • Write an ant script that does the required steps; you can then execute it via the 'Run External Command' menu item / icon.