views:

362

answers:

8

I'm fairly new to Java development, and people have been suggesting I use Eclipse as an IDE for the work I'm doing. My code lives on a linux box (running Ubuntu of some fairly recent version), but I use a MacBook as my main computer. I've been ssh'ing into the linux box to work on the non-Java code, simply using vim and have done the same up to this point with the java code, compiling it from the command line. From what I hear, Eclipse would be fairly useful in managing the project's code, but from all I've found, it seems I need to run it locally with the code; i.e., either with the code on my Mac or Eclipse on the linux box, not with Eclipse on the Mac and the code on the linux box.

Any one else in a similar situation that has a working solution they can explain?

A: 

If you mount the Linux box as a drive on your Mac, you should be able to point Eclipse at the code. I do that at work, where my code resides on a Solaris box, yet I'm running Eclipse (and NetBeans) to edit that code on Windows.

The only catch is that you need network access to that machine.

Thomas Owens
Note that I've never used Mac, so I can't explain how to mount a drive.
Thomas Owens
I'm curious - why the downvote?
Thomas Owens
re: your first comment, openafs hooks nicely into macs. as to the second, perhaps people don't like solutions unless they involve a version control system? No clue, I manage some stuff with the subversive plugin (the stuff with multiple developers) and hobby stuff with no version control.
Carl
There's no reason, even with a version control, to have the code on your machine. In my case, I could put the code on my machine...but they make backups of the Solaris every night...so why not keep it there, so it's not only backed up with the version control server, but with the Solaris box (and that way, stuff I'm working on that isn't yet checked in...still gets backed up).
Thomas Owens
+1  A: 

You could install Subversion on your Ubuntu box and connect to it on your MacBook, which has Eclipse installed. You also need to install a Subversion client in your Eclipse (which is an easy thing to do). I'm sure Google will fill in some gaps.

Bart Kiers
This would work, but I believe Mike A wants to avoid having a copy of code on his local machine (perhaps a space constraint). Either way, though, version control is a must. The code that is on the Solaris box in my case is indeed under version control. I just choose not to check it out locally, but into my user space on solaris.
Thomas Owens
@Thomas Owens: yes, you may be right. And I agree: version control is a must. The OP might very well be trying to do this in order to mimic some version-control-behaviour.
Bart Kiers
Indeed. If this is about mimicking version control...DON'T DO IT! Get real version control ASAP.
Thomas Owens
It's not about mimicking version control, just not sure the best way to do it, coming from a perl/php/various-scripting-language background using vim. We've been prototyping fast-and-furiously and have been lax on the version control, so perhaps it's time to sit down and get SVN set up and running properly.
Mike A.
+5  A: 

The first thing you should do is set up a revision control system. I recommend SVN. Then install Eclipse on your Mac with the Subclipse plugin so you can check out the code to your local machine and work on it locally. You can deploy the code to your linux box in a number of ways. The simplest might be to simply check out the code from SVN on your Ubuntu box.

Asaph
See this for more info on the SVN plugin. http://stackoverflow.com/questions/61320/svn-plugins-for-eclipse-subclipse-vs-subversive
TJ
+1  A: 

You can also write and compile your Java code on your workstation, and then export it and ftp it (as a jar file) up to the host where it will execute as needed. Eclipse also has a remote debugging feature that you can use to look into the remote JVM from your workstation, so you can step through it using the IDE as it runs.

Joe
Don't forget that the JVM running in debug mode allows some hotswap capability.
Joshua
A: 

Another option is to run a remote graphics server like FreeNX on the Linux server, then connect to it from your Mac with the FreeNX client. You can then have Eclipse installed on the Linux server and just use your Mac as a display client, which avoids any syncing problems. NX works pretty well over low-bandwidth connections; a number of the developers at my company use this method to connect to our office servers from home.

gareth_bowles
A: 

From your description it sounds like you're not allowed to store the code locally on your mac. I'm in a similar situation, where my company doesn't allow you to store stuff on your home computer (I have a mac at home, and a Linux and a PC at the office). I've found that Eclipse is responsive enough when you remote desktop or VNC to it, if that's allowed by your company.

If I'm misunderstanding you, then source control is your friend - develop on the mac, check in, and execute on the other machine. Alternatively, you may want to use rsync. I did this thing when I had to develop an Eclipse plugin for multiple platforms and it worked fairly efficiently.

Uri
A: 

You could try using the Remote System Explorer architecture. I've not used it myself so I can't say how well it works, but this blog describes how to use RSE to browse remote files.

Rich Seller
A: 

If your bandwidth is big enough and the Linux box can run Eclipse on its own, you can tell the Linux box to use your Mac X11 display.

A frequent way to do this, but a bit slow, is to start X11 and then use "ssh -X linuxbox" (or "ssh -Y linuxbox") to get the X11 forwarding. Test with xdpyinfo, and then just run Eclipse in your ssh'ed in shell.

Thorbjørn Ravn Andersen