Sharing Eclipse projects on a dual boot system
I recently converted my laptop to a Ubuntu/Win7 dual boot system, each with their own partitions, plus a third shared partition. I'd like to use Eclipse and access my SVN repository regardless which system I'm booted into at the time.
If I have my local SVN repos开发者_如何转开发itory on the shared partition, how can I enable the workspaces on both Ubuntu and Windows to the files?
The only other alternative I've come up with is to have each OS have their own working copy, and apply commits and updates as necessary.
Edit for clarification
I'm not asking if its possible to have a single workspace for both Linux and Windows. I had in mind a single source folder in the shared partition that was linked to each workspace. Therefore, the file paths would be OS-specific, and only the source code would be accessed.
I don't think this is really possible.
There are a number of files in the workspace .metadata
folder (for instance the definition of the JRE/JDKs or the eclipse path) that will be dependent on the underlying file system (e.g. c:\eclipse
for Windows on one side and /home/me/eclipse
.
What you might be able to do at best is two different workspaces, one for windows and one for Linux.
These two distinct workspaces, in turn would be sharing a number of project. These projects would not be in the so-called default location
(that is under the workspace
folder location) of any of these two workspaces but under a separate hierarchy under your shared partition. Yet because of these decoupling you would end up doing several things twice (such as defining launch configurations etc...). Which is fair enough I guess.
Finally, since Linux can read ntfs file systems pretty well (to the exception of ACLs which would actually be a plus) using ntfs3g, you can have your shared partition in NTFS. Windows is less apt at reading/writing ext3fs (let alone ext4fs). Just make sure you mount your NTFS partition with a common character set.
In addition, instead of having a dual boot, you could have Windows run inside a VM (e.g. VirtualBox and share the common data as a linux shared folder either through standard Samba or VirtualBox built-in shared folder mechanism. The difference with a dual boot would be that you could in theory cheat eclipse and access your 2 different workspaces simultaneously yet they would share the same projects. Of course this would require some tweaking from the Samba part for locking management.
I would not recommend sharing the same Eclipse workspace between two operating systems as they use different path syntax. You can also run into character encoding and/or line separators issues in files placed into source control. Typically a source control system will do adjustments to these during "check out" and reverse adjustment on "check in". You can have weird problems if you retrieve code in Windows and check it back in on Linux (or the other way around).
I would recommend keeping your Windows and Linux workspaces separate.
精彩评论