Skip to main content

Eclipse: Same Workspace in windows and linux

I believe almost all dual booters wish for something like this.. The eclipse workspace should be independent of the operating system they are logged in..! well.. I have found a way to do it..

Issue:
    The problem with using the same workspace is that 'it doesn't work!' :D well.. the configuration of a workspace is stored in .metadata folder inside the working directory.. it has all the paths.. Most importantly, the path to JRE/JDK..! If a workspace from Windows is opened in Linux/ubuntu the java projects wont compile cause of the build path issues.. If you set it right in ubuntu, it wont work in windows..

Solution:
Well..One of the solutions that works or at least worked for me is:
    Having 2 ws with all projects pointing to an external folder..!

There may be other solutions, but this is how it is done:
    Say you have a workspace under windows, now you need it to work under ubuntu..
Well.. leave alone the original workspace.. Create a new one and 'import' the projects from the original one.. What needs to be taken care of is: dont copy them to their default locations, that is the new workspace... You can also choose to copy the layout and other settings as well.. That way the projects will still be in the original workspace, pointed to from your new one, with all your operating specific data stored in the new workspace..! Works! You can do this for the Windows as well, keeping the 'projects folder' completely independent..

Problems with the approach:
The problem with this approach is that when you create a new project you need to be careful to create it in the original workspace i.e. where all other projects are.. Thats not all that difficult.. And even if you forget once, you can copy this project to the central projects location! Simple...?

What did I try it with:
Windows 7 & Ubuntu 10.10 & 11.4.
Eclipse 3.6.2 Helios

Thats it.. And you have the OS independent Workspace!! :)

Comments

Popular posts from this blog

Using Docker and a Private Registry with VPN On Windows

Wasn’t that a very specific title? Docker has a very good documentation and reading that alone is enough for most of the straightforward tasks we might want to do. But as always some practical tasks are not straightforward, hence this blog. What we are going to see here today is how to setup docker toolbox on a Windows machine, make it work even when VPN is connected, make it talk to a private, insecure docker registry (that is why VPN) and configure it so it can run docker compose and see how we can set this config as a one-time activity. That’s quite a mouthful, but yes this is what we are going to do. All ready? Let us begin then.

Install Docker ToolboxGo and download the docker toolbox and install it. That should create a shortcut called “Docker Quickstart Terminal”. Run it. That should show you an error about virtualization.

Enable VirtualizationRestart your machine, enter the BIOS settings and enable virtualization. It may be under advanced settings. On this Laptop, it is under th…

Yet another packager for node

Yet another packager for node There are so many packaging systems for node already, or maybe not as many, so here I am presenting another way to package your applications into an self extracting executable that has no dependencies. Ah well, a few dependencies, like the processor architecture, and Linux operating system may be, but that is all. What is it? It is a modified shell script originally used to create self-extracting and installing applications for Linux platforms. What it does is, it creates a tarball which includes your code, the modules it depends on, the specific node binary it uses, and appends it to a script with the command to execute your code. It is essentially a binary merge of the files, the shell script and the tar.This is not something new, people have used such a system in the past to deliver applications for Linux, every time you see an obscenely large ‘.sh’ file (for being that, a shell file) that can install or execute an application without requiring any ot…

Opinionless Comparison of Spring And Guice as DI frameworks

Recently I had to delve into the play framework for a particular microservice at work. Now it is not exactly new, nor is Guice, nor DI, but coming from Spring world it was still a big shift in approach. There is a lot of documentation comparing Spring with Guice, stating which is better, why and how. In general these articles discuss specific points where these two frameworks differ in their approaches and which approach seems better to the author. I am not sure these articles really help someone trying to take a dip in the other framework. We know the differing opinions, as they are stated by the authors of the respective frameworks in their own documentation as well, another person (article’s author) reiterating it with an incomplete comparison of these frameworks does not sound helpful. What would work much better is a direct mapping of features, without author’s opinion (Didn’t this sound like an opinion). That should help someone getting into Spring from Guice world or vice a ver…