7

I'm new to Eclipse, and I can't seem to get the package explorer to cooperate. Here is my current file tree:

└───workspace
    ├───bin
    │   └───var
    ├───res
    │   └───gui
    └───src
        └───var
            └───all of my source code

I attempted to start a workspace in the current tree, \workspace, \workspace\src, and workspace\src\var. All resulted in an empty package explorer. I have tried Eclipse Indigo, Juno, Classic Indigo, and Classic Juno, with no success. Can anyone offer help?

Code Monkey2
  • 151
  • 1
  • 1
  • 8
  • What are you actually trying to do? – BalusC Dec 21 '12 at 15:22
  • 7
    It seems you are trying to force Eclipse to work in a way it wasn't designed. A `workspace` in Eclipse should be a directory in which you hold your projects. You should start with an empty workspace directory and then create the different projects using Eclipse. – Alonso Dominguez Dec 21 '12 at 15:23
  • So you're saying I swap "workspace" with my current directory? – Code Monkey2 Dec 21 '12 at 15:25
  • 1
    no, I say create a new directory, point your Eclipse workspace to it, then use Eclipse `New Project` wizard to create your projects. – Alonso Dominguez Dec 21 '12 at 15:26
  • 1
    Find an IDE suited for yourself. Don't suit yourself for an IDE. – S.D. Sep 22 '13 at 07:46

2 Answers2

19

Maybe a little late, but i found a solution to this problem! Just right click on the explorer, select import, then in general select Existing project into workspace then find the root folder of your project and it should import it just fine. Well, worked for me anyways ;)

Ludwik
  • 2,247
  • 2
  • 27
  • 45
  • 6
    This, this, this! No, not to late. For me this came just in time! Thanks so much! – Riscie Dec 14 '13 at 19:53
  • 1
    If this helped you (wow, this was almost a year ago... :) ) please accept this as the correct answer. – Ludwik Jun 30 '14 at 16:36
1
  1. Rightclick on your Project
  2. select 'Properties'
  3. 'Java Build Path'
  4. select tab 'Source'
  5. Button 'Add Folder'
  6. add your source folder / all your source folders
MrSmith42
  • 9,961
  • 6
  • 38
  • 49
  • I don't see "Java Build Path" on Java Juno. – Code Monkey2 Dec 21 '12 at 15:33
  • Never mind, I figured it out. Probably a separate question, but why did Eclipse not recognize the .project file in the original "workspace" directory? – Code Monkey2 Dec 21 '12 at 15:37
  • @CodeMonkey2 You are confusing the terms "*workspace*" and "*project*". A "*workspace*" it's just a container for projects, your project should be a different folder inside the workspace. Notice that after starting Eclipse your "*workspace*" contains a `.metadata` folder and no `.project` or `.classpath` file. – Alonso Dominguez Dec 21 '12 at 15:43
  • My tree included only the folders, but the .project and .classpath files were there. – Code Monkey2 Dec 22 '12 at 20:43