• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Need help sharing one Eclipse workspace across platforms (different .metadata folders required)

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I develop across a few different machines, most of which are windows, but one is linux. My goal is to have all installations point to a single workspace folder that I replicate on all machines using Dropbox. The problem is that the ".metadata" folder that is in the workspace has machine specific information in it, that would confuse my linux machine if it had windows paths. Thus, the goal, is to create two ".metadata" folders, one called ".metadata-windows" the other called ".metadata-linux". The next step would then be to change something in an eclipse file somewhere that tells it to load the correct metadata. So my windows installations would find the windows metadata, and linux installations would get the linux metadata. The question is, does anyone know if this is possible? And if so, where and what do I need to change?

There are ways around this I realize, like putting the project folders in dropbox and then just manually adding them to my various eclipse installations, each with their own workspace. But I though it would be cooler to just have the one workspace. Any ideas anyone has would be greatly appreciated.

Thanks,
Trevor
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The problem is that the ".metadata" folder that is in the workspace has machine specific information in it


For example ?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

For example ?


Any file location, particularly the locations of the registered JVMs. Export your preferences to a file and dig through them - there is a lot of stuff that is OS-specific.

If there was a way to convince Eclipse to ignore driver letters in Windows, and use forward slashes, then I would be very happy. I have similar problems as Trevor just copying my projects from one Windows machine to another when one one machine the workspace is on the C: drive, another it is on the D: drive, and another it is on the F: drive. And of course when I move all of this to any of my Linux boxes, then the drive letters just confuse things. Now if I could get Eclipse to recognize that the workspace is at "/opt/workspace" regardless of the OS, I would be very happy.

And yes I do use classpath variables, and they help keep projects OS independent, but the classpath variables themselves use an OS-specifc format in the preferences (which are stored in .metadata).

Oh, and welcome to Java Ranch, Trevor!
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Any file location, particularly the locations of the registered JVMs.


That was a stupid question...

What about sharing the project via a source control like Subversion ? I know, it's different from sharing the same workspace, but is sharing workspace manageable without getting into versioning problems ?
 
Saloon Keeper
Posts: 24294
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It really isn't that good an idea to share the ".metadata" folder, since its particular purposes in life is precisely to store the machine-local information. In fact, user-specific machine local information. Sharable information in eclipse is in the .project and .classpath files. And more recently, in hidden directories, depending on the nature of the project.

I shudder when I contemplate the idea of bopping around randomly modifying the same app from multiple machines all day long anyway. True, I have a KVM right now attached to a Windows machine and a Linux box, but the projects in one machine are entirely separate projects from the projects in the other. They so, however, share common source code repositories and deployment servers.

If you really need to access the same project on multiple machines, consider installing X servers on the Windows boxes, and make the Linux machine be an X client (X terminology for clients and servers is "backwards"). Then you can run the same instance of Eclipse and access it from any X-capable Windows, Linux, Solaris, or Mac client (just for starters).

Windows Remote Desktop could do the same in reverse, but much less gracefully (and it's not really a multi-user system, like Citrix aspires to be).
 
author & internet detective
Posts: 40746
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or a version control system. Let one of these systems host SVN or GIT and check out the projects rather than sharing the workspace.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, all of my projects are stored in Subversion. I only attempted to copy the entire workspace once, many, many years ago and found that it didn't work because of all the things already mentioned in this topic. But I do like to set up my workspaces with a given set of preferences, and export those preferences and import them into a new workspace, often on different machines. I usually either edit the exported file to remove the OS-specific file locations, or I clean up the missettings after importing it; but I wish Eclipse would offer a way to do that a little more automatically.

Besides, my original interest in this topic was in response to Christophe, who I assume did not know that there were OS/machine-specific settings in the .metadata.
 
Tim Holloway
Saloon Keeper
Posts: 24294
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Actually, all of my projects are stored in Subversion. I only attempted to copy the entire workspace once, many, many years ago and found that it didn't work because of all the things already mentioned in this topic. But I do like to set up my workspaces with a given set of preferences, and export those preferences and import them into a new workspace, often on different machines. I usually either edit the exported file to remove the OS-specific file locations, or I clean up the missettings after importing it; but I wish Eclipse would offer a way to do that a little more automatically.

Besides, my original interest in this topic was in response to Christophe, who I assume did not know that there were OS/machine-specific settings in the .metadata.



For this reason - as well as several others (most notably when I upgrade Eclipse versions), I wish that Eclipse had developed a discipline where the plugins could be enumerated for preferences for bulk export/import. So far, alas, not.

For those who are developing plugins that might contain settings that should be consistent site-wide - such as source-formatting rules - I'd like to point out that a URL is a more flexible option for read-only or read-mostly config information. That way, you can provide the option of a local file (via the file:// protocol), or of shareable locations published to web servers etc.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:I wish that Eclipse had developed a discipline where the plugins could be enumerated for preferences for bulk export/import.


I second that. I would also like it if the export contained only those settings I changed, and not any default settings.

Trevor, we haven't heard from you since your original post. Have our ramblings helped answer your question and/or given you ideas on how to work around the situation?
 
Trevor Whitney
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey everyone,

Thanks for all the responses. I guess the conclusion is that it's not really possible to have ONE installation shared across systems. What I'm doing now is having OS-specific installations installed on each of my machines, with a local workspace where the .metadata is kept. I periodically create archives that include my eclipse installation folder and local worksapce, one for each OS, and that makes installing on a new machine quick and easy. As for my projects, whenever I start a new one, I don't use the default workspace, but instead create a folder in my dropbox folder, which synchronizes my project files across my various computers. Then, all that's needed is to import the project on the other machines, and everything's always available and up to date, regardless of what machine I'm on. So far it's been working pretty well!

Thanks again for the help and warm welcome to the community!

-Trevor
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic