- This topic has 8 replies, 6 voices, and was last updated 14 years ago by juan-eclipse.
-
AuthorPosts
-
Riyad KallaMemberHi all,
i’m having the same problem as described above.
My system:
WinXP SP 2
Eclipse 3.1.1 build M20050929-0840
JDK 1.5.0_04-b05 (mixed mode)
fresh eclipse installation, no plugins, no updates
running as administratorI just downloaded Eclipse 3.1.1, unzipped it to C:\ProgramFolder, started it, selected D:\WorkspaceFolder as Workspace. D:\WorkspaceFolder already existed and contained other folders.
In the menu I chose file>new>project, selected “Java Project”, “create project from existing source”, entered “D:\WorkspaceFolder\someotherfolder\another\another” (These folders already existed). Then, when i start typing a project name, eclipse states “cannot create project content in workspace”.
I tried several project names, also the name of another folder under the “D:\WorkspaceFolder\someotherfolder\another\another”. Created another workspace on drive c:, tried to create the project directly under D:\WorkspaceFolder. This all doesn’t help.
When i select “create new project in workspace” it works fine, but i want to create from an existing file tree.
I also downloaded eclipse 3.1 but it’s the same.
Also tried to find help on google, eclipse.org and in the help files, but nothing useful.Thanks in advance for any help
Riyad KallaMemberTanken,
If you have created projects in these locations in the past, the way you get them back into your workspace is to use File > Import > Existing Project. Eclipse won’t let you recreate a new project ontop of an existing one.
TankenMemberFirst of all: Thanks for your reply.
I think i failed to express this correctly. The existing folder does not contain an eclipse project, just some java files. I’d like to make an eclipse project from those.
Riyad KallaMemberAhh, the reason you can’t do this is because your directory already lives under your workspace dir.
When Eclipse creates a new project, it automatically creates a folder under the Workspace dir with that name and sets it all up. The problem here is that you alread *have* a directory with that name so Eclipse refuses to create the project.
I realize that the behavior you want is for Eclipse to “overlay” it’s project files onto the existing dir, but it won’t (it plays it safe). The reason most folks likely don’t run into this is because their projects exist in a source control system, so they can check out the soruce code directly into a project. In your case, I would suggest moving all the non-projects out of your workspace, and then after creating your project for them in Eclipse, dragging and dropping the project contents into the new project. From that point forrward these projects can be pulled into your workspace using File > Import > Existing Project, now that they are Eclipse projects.
Hope that helps.
TankenMemberWhat i don’t understand is: There are two options in the “create new project”-window. One is “create a new project in the workspace”. The other is “create a project from existing source”. This sounds to me like exaktly what I want to do. I have used eclipse before on a linux machine and i think (not perfectly sure) i have done something like this and there was no problem. I’ll try it on the linux machine again.
For now I’ll just stick with your advice and create a new project to import the existing stuff one by one.
Thanks again.
allelopathMemberTanken…I agree with you…that option describes exactly what I want to do.
I finally got sick of creating the project and then copy source over that I googled to find the ‘real solution and found this thread, but apparenty it is the only thing to do.
bigcmosMemberI found this to be a pain as well as I have a root directory which is my workspace and multiple sub directories for all of my projects. The easiest workaround I found, which is what I wish Eclipse did is to copy a .project file from another project directory I already have and copy it over to the base directory of the new project I am trying to create. I then modify the .project file to be the name of the project and remove all of the other junk in it. After doing this you should beable to import the project without haveing to muck with moving all of the source files.
Good Luck and lets hope this gets fixed in later versions of Eclipse.
patelsameermMemberHi..! I was having the same problem.
Finally i came with simple solution.
Follow the steps:
1) Close your Eclipse
2) Double Click it to re-open.
3) When it asks you for WorkSpace destination, change it to the folder to which you want to create new project.for example, i want to create new project named ‘pwMgr’ and my existing folder is at “D:/TP_Projects/pwMgr”. So when eclipse will restart, I will change the workspace to “D:/TP_Projects/pwMgr”. Then you select” File-> New Project->Java Project->” and select “Create project with Existing”. Browse to your folder name and then give the same name as a project name. It will create you the same you wanted.
Try it and let me know.
Questions or Concerns, Please let me know.
:- Sameer
juan-eclipseMemberThis message has not been recovered.
-
AuthorPosts