59

I've searched for 2 days and can't find anything. I find things that are close, but not what I need.

I got a new computer recently and copied all of my projects over to my new computer.

I opened Eclipse and generated a workspace, which I then closed out of Eclipse and copied my projects into the workspace/projects folder.

I reopen Eclipse and my projects do not show up at all in the package explorer.

I know that I have the correct folders in the correct directory.

The closest thread I found to this is: Eclipse - Import an existing project?

but even that didn't help, my projects already meet that...

I have tried refreshing, reopening, fooling with working sets, etc...

Community
  • 1
  • 1
D3_JMultiply
  • 1,022
  • 2
  • 12
  • 22

19 Answers19

95

Just because you have a project inside the workspace directory doesn't mean Eclipse opens it or even sees it automatically. You must use File - Import - General - Import existing project into workspace to have your project in Eclipse.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • It probably stores them in some internal file of the workspace. If you select the directory containing all the project directories, it should detect all the projects and suggest to import them all at once. – JB Nizet Dec 30 '11 at 21:42
  • 1
    thank you again, you really heped. I gave the acept to the other person because he gave more detail, but I think I give it to you because you said the same first. – D3_JMultiply Dec 30 '11 at 21:48
  • @JBNizet, the keyword there is "should" - I'm trying it right now and it's only seeing one project out of twenty or so. – James Moore Oct 06 '12 at 17:59
  • Did they change the menus? I don't see "General" in the File menu in Eclipse (Windows 7). Oh I think it's File > Import > General But it didn't help. It won't recognize the project that's in the folder... – shim Oct 23 '12 at 05:16
  • Thanks this worked; although it wasn't _File -> General -> Import_, it was _File -> Import -> General -> Existing Projects into Workspace_... – Electric Coffee May 09 '13 at 17:08
  • 1
    When I do this it says it overlaps the workspace. I am really confused about the proper way to open a java project. – AaronLS May 11 '17 at 20:07
16

For Juno: (With Source in E:\workspace and destination in C:\workspace)

  1. Copy project directory in its entirety to the workspace directory. (e.g. Copy E:\workspace\HelloWorld C:\workspace\helloWorld)

  2. Start Eclipse.

  3. Perform: File --> Import

  4. Select: General -- > "Existing Project into Workspace"

  5. "Next >"

  6. Check "Select root Directory"

  7. Select with "Browse Button"

  8. Select "C:\workspace"

  9. A list of existing projects will appear. Just check the ones that are in Bold (To Be Imported) then press the "Finish" button.

Review the Package Explorer and your copied projects should now be there.

Mark Mayo
  • 12,230
  • 12
  • 54
  • 85
David K Hill
  • 171
  • 1
  • 4
12

This problems comes while .metadata of current workspace has been corrupted due to shut down Eclipse Unexpectedly. So if you face this problem just do the following steps:

  • Create a new workspace. Import your existing projects to your new workspace.

you made it!

Community
  • 1
  • 1
Aman Goel
  • 3,351
  • 1
  • 21
  • 17
  • what about configured servers in previous workspace ? – Yuriy Kravets Apr 21 '16 at 10:06
  • How wonderful! I tried importing my projects from the root directory containing my projects but they did not appear in bold. So I could not select any of them. Your post fixed my problem! – Abdel Aleem Jun 25 '19 at 12:06
8

I had the same problem over and over again the solution that a have found works for now

  1. Close Eclipse.
  2. go to workspace.metadata.plugins
  3. remove org.eclipse.core.resources
  4. Start Eclipse
  5. Do File->Import
  6. General->Existing Projects into Workspace and import all the project from the workspace
Mr.Java
  • 369
  • 4
  • 16
  • This question was answered almost 3 years ago. Thank you for the solution, there were other solutions that were simpler however and didn't require removing the core.resources. – D3_JMultiply Aug 26 '14 at 23:35
  • 2
    The same issue is happening also the newest Eclipse Kepler SP2 for Java 8, for now only this solution works, so the issue is reappearing even today, that is way the answer is posted – Mr.Java Aug 27 '14 at 09:28
  • That statement makes no sense, the other answers also fix the issue in the newest versions as well, not just this solution. The solution to these types of problems should never involve deleting the core resources, it may allow you to fix the issue, but you're risking messing up other features by deleting a critical resource... – D3_JMultiply Aug 27 '14 at 15:17
4
  1. Netbeans allows you to do a simple filecopy. As you know, Eclipse doesn't work like that. You must explicitly "import" files and projects.

  2. If you do import, and if there are no problems, then they should show up.

  3. I'd consider:

    a) making a backup of your existing workspace

    b) deleting and reinstalling Eclipse

    c) Trying another "test import"

paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • thank you, I never knew that Ecipse stores the projects or something somewhere so that it know what projects have actually be imported and stuff... I don't see any directory/file that it saves any of that info itn, so I don't get how it would keep track... but thanks, I already got it working because you gave the same suggestion as the person before you, only you gave more detail. – D3_JMultiply Dec 30 '11 at 21:44
2

in Eclips the Package Explorer Right click on any viewable project and select Show in -> Project Explorer

Package Explorer -> Right click -> Show in ->Project Explorer

you should be able to see all the imported projects in your Eclipse workspace

ahmedibrahim085
  • 365
  • 5
  • 11
  • This is over a year old, and has already been resolved. The issue was that I hadn't actually "Imported" the project and just copied them, unknowing that there is a file in the workbench directory that stores the information about which projects are imported. After importing the projects they worked fine. – D3_JMultiply Apr 18 '14 at 23:44
  • 1
    @D3_JMultiply I know it is old. I just had the same problem and I tried the proposed solutions & they didn't work for me (some of them were not an option as reinstalling eclipse). I was even importing projects as I do in my daily work!so I kept playing around with eclipse until I found a solution and I shared it here. That is all. – ahmedibrahim085 Apr 20 '14 at 14:43
2

Even I had also observed the similar problem. I had closed my eclipse project because of some reason and on restart some of my file added were not visible in explorer even though corresponding file were existing.

Following solution worked for me: Select whole workspace (Ctrl+A) ==> Righ click and press Refresh.

2

You put them in the workspace/projects folder. You should put them directly in the workspace folder and then do an Import Existing Projects into workspace.

Francis Upton IV
  • 19,322
  • 3
  • 53
  • 57
  • 2
    I got it working, and it doesn't really matter where I copy them to, copying them into /projects the imprt still worked so... – D3_JMultiply Dec 30 '11 at 21:45
  • Yes, that's right, you can import your projects from anywhere, it's just not a standard location for your projects in the workspace. – Francis Upton IV Dec 30 '11 at 21:49
  • um, it is the standard... that's where all the projects you make go automatically... I copied all my project fies into the same exact directory that my new projects were, so it IS the standard location. – D3_JMultiply Dec 30 '11 at 21:52
  • Try doing a `New -> Project` in the Package/Project explorer and see what the location it suggests is the standard location. – Francis Upton IV Dec 30 '11 at 21:55
  • EXACTLY, That's what I'mtalking about dude, I do that and it suggests workspace/projects, like it always has. – D3_JMultiply Dec 30 '11 at 22:21
  • Interesting, it never has for me. Always gives me the default location as the same location as whatever my workspace is. Funny. – Francis Upton IV Dec 30 '11 at 22:25
  • Ahh, I understand then, I thought you specified your workspace directory as "workspace". – Francis Upton IV Dec 31 '11 at 08:34
  • I usually just go with the default thing, I start it up and hit "Ok" and it automatically does workspace\projects, because there are other floders that end up going in workspace besides just my project folders. – D3_JMultiply Jan 06 '12 at 20:55
1

Or you could try:

  1. Go to File -> Switch Workspace
  2. Select your workspace (if shown)
awesoon
  • 32,469
  • 11
  • 74
  • 99
GraSim
  • 3,830
  • 1
  • 29
  • 35
1

As I had imported my project from a "git clone", I had to select File->Import-> Git->Project from git -> Existing local repository

galeop
  • 1,685
  • 14
  • 13
0

Here's a specific problem I ran into when downloading a project from the internet.

  1. Make sure you unzip correctly if it's zipped, you can sometimes get an extra level.
  2. Make sure you place the project in the project file, not directly in workspace.
  3. See if .project and .classpath have been renamed to _project and _classpath. You can't rename them directly so open a text document called .classpath and paste _classpath 's contents in there, saving as all files, not a .txt. _classpath can be opened with notepad.
  4. Import the project from the file workspace. It will look for a folder called projects, your's should be inside it.

    Hope this helps :)
0

The following worked for me.

  • Create a new project in eclipse.
  • After creating a new project in eclipse, right click and select import.
  • General Import > File System
  • Select all the folders under your project except the root one. Click finish.

This would create the required meta data and other internal eclipse project file system which will display your project's files.

You can also import the project directly as a file system. Follow the above steps if you are unable to import it directly.

ShankarDaruga
  • 164
  • 1
  • 5
0

Hi i also come across same problem, i try many options ,but finally the most easy way is,click of down arrow present inside ProjectExplorer-> customize View->filter-> unchecked close project.

And will able to see all closed projects.

dinesh
  • 1
0

I have tried many of the option suggested but at last importing project in new workspace solved my problem.

I think there is some problem in metadata files in old workspace.

meetme
  • 43
  • 6
0

I just wish to add one important detail to the answers above. And it is that even if you import the projects from your chosen root directory they may not appear in bold so you won't be able to select them. The reason for this may be that the metadata of the projects is corrupted. If you do encounter this problem then the easiest and quickest way to fix it is to rid yourself of the workspace-folder and create a new one and copy+paste your projects (do it before you erase the old workspace) folders to this new workspace. Then, in your new worskapce, import the projects as the previous posts have explained.

Abdel Aleem
  • 667
  • 10
  • 15
0

Yeah.... i kinda see what you need. I just came across same problem.

Here is exactly what i did. Now, bear in mind, this some low level knowledge, since i'm just starting. I made my life complicated, so i needed solution. I kinda found it on my own, using different directions from above answers.

I switched from win 10 on HDD to linux on SSD, so i needed my few of .class and .java imported into new workspace.

First i made a mistake, not using export option on windows and i just simply copied all of files from src and bin folders on win 10 to src and bin folders on linux. Of course workspace did not see those files.

Solution was found in IMPORT tool (which i should have used right away).

  1. I put all of files in src folder into zipp file, and moved this file to some arbitrary folder (Home folder in my case).

  2. Go back to src folder and delete all of .java files (you won't be needing them anymore).

  3. Then i opened my empty project and selected import from File menu in Eclipse. In import window, under option General (first one) select Import Archive.

  4. Now simply find your zip file, and Voila! All is where it should be.

0

Problem: After creating a PyDev Project, the project does not show up in "PyDev Package Explorer" ;(

Solution: This is what I do to see them all in "Project Explorer":

I am using Eclipse IDE 2019-12

click on "Resource" icon at the top right corner

Now you shall see all projects show up in "Project Explorer".

Tricky note: now if you click on "PyDev" icon, you will see less projects show up in "PyDev Package Explorer" Magic?

Paul Wang
  • 1,666
  • 1
  • 12
  • 19
0

What I did wrong about it, I used "import" - > "Projects from Folder or Archive" because I thought it would be the same thing. You have to use "Existing Projects into Workspace". Maybe this helps someone.

Majid Hajibaba
  • 3,105
  • 6
  • 23
  • 55
maxmitz
  • 258
  • 1
  • 4
  • 17
0

I experienced the same issues and I just click on Window -> Show view -> then Project explorer.

Then I got my project that was inside my eclipse workspace.