How do I transfer an Eclipse project from Windows to Ubuntu?

14,379

Solution 1

Yes you can transfer eclipse programs from ubuntu to windows and the reverse too. For transferring files from windows to ubuntu you need to export you project from Windows and then import the project to Ubuntu.

Exporting File->Export->General->Archival file and tick the project or files(All files related your project must be ticked) which you want to export and select where you want to save the files and you also need to name the file. Now you

Importing File->Import->Archival file and select exported file from Windows. Then there is a field called Into folder: here you need to select your workspace location and click finish

Solution 2

Do not just open the copied project. Use File->Import->Existing project into worksoace.

Share:
14,379

Related videos on Youtube

Anubhav Mishra
Author by

Anubhav Mishra

Updated on September 18, 2022

Comments

  • Anubhav Mishra
    Anubhav Mishra over 1 year

    This might seem like a repetitive question, and on Googling I found a bunch of similar questions asked but seriously, nothing has helped.

    I have no idea why the projects don't work as it is when they're imported and how to fix them. I keep getting these errors saying XXX can't be resolved. Screenshots below.

    Can anyone please help? I have only JUST started using Ubuntu.

    enter image description here enter image description here

  • digitaljoel
    digitaljoel almost 12 years
    Another option is to use a source control system like subversion and a standard build system like ant or maven. Then you can just check out the project and import it into your workspace. A comment here instead of an answer since it's along the same vein of importing rather than simply opening.
  • vaquito
    vaquito almost 12 years
    @digitaljoel source control systems are generally nice, but will not help in working with a project copied from another computer (which is what this question is about). Regarding ant or maven - if you have a choice, choose maven.
  • vaquito
    vaquito almost 12 years
    No, the symptoms shown indicate that the Java library in the project build path is not correct for this machine. An import fixes this.
  • Anubhav Mishra
    Anubhav Mishra almost 12 years
    @ThorbjørnRavnAndersen that is what I did. I copied the folder that contained the project to my Ubuntu desktop and then selected File > Import > Existing project into workspace
  • Anubhav Mishra
    Anubhav Mishra almost 12 years
    I didn't export that. I am not in front of my computer, but I'll try this soon. This looks good.
  • vaquito
    vaquito almost 12 years
    In that case, open your Build Path and edit the JRE library
  • Samik
    Samik almost 12 years
    If the build path for Eclipse is incorrect then this should occur in every project in Eclipse, not only for the projects imported from Windows, isn't it?
  • Samik
    Samik almost 12 years
    Ok, you mean the classpathentry kind="con" one. Got it. I thought Eclipse maintain the default classpath centrally i.e. not for each project separately.
  • Anubhav Mishra
    Anubhav Mishra almost 12 years
    Hey, I tried exporting it to a zip file. When I was importing it back to Eclipse, it said I needed to create a blank project first to import from an archival file. So I created a new dummy java project and them imported it. But now when I compile it doesn't allow me to saying 'Editor doesn't contain main type'. You can see the error and the file hierarchy here :postimage.org/image/w9x171l6b
  • Anubhav Mishra
    Anubhav Mishra almost 12 years
    @ThorbjørnRavnAndersen ignore me for my naivety but as I said I'm new to using Ubuntu. How do I appropriately edit the JRE library?
  • Anubhav Mishra
    Anubhav Mishra almost 12 years
    Sorry, I do not know how to do that. Could you dumb it down?
  • vaquito
    vaquito almost 12 years
    This is an Eclipse problem. Right-Click the broken project, find Build-Path -> Configure Build-path. Are you familiar with Eclipse?
  • digitaljoel
    digitaljoel almost 12 years
    @ThorbjørnRavnAndersen source control most definitely could help in this situation. Rather than copying the project on a thumb drive from one machine to another, you use source control as the vehicle. If using Ant or Maven, eclipse is smart enough to recreate the project settings for you. You don't checkin .project, .classpath, or .settings and all is well. The title of the question is "How do I transfer an eclipse project from Windows to Ubuntu" and using source control is a good answer to that question.
  • vaquito
    vaquito almost 12 years
    @digitaljoel source control is just responsible for getting files to appear on your harddrive (and on the SCM server), and is in this regard the same as copying the files manually and is unrelated to the problem in the question. That problem is how to make Eclipse work with the files available, where the build path clearly is broken, and saying "just use ant or maven" does not cope with the problem at hand. All that is needed is to fix the Java setting - not introduce a new build tool and additional infrastructure, which does not solve the problem asked.
  • vaquito
    vaquito almost 12 years
    @ProgrammingNoob one more thing - when you fix your Java library in the build path, tell it to use an execution environment (like Java 6) instead of a particular version. That mechanism is much more robust for what you want to do here.
  • tim687
    tim687 about 9 years
    Can I use this with a gitlab server?