将项目文件放入工作区/项目后,Eclipse 项目未显示
我已经找了2天了,没有找到任何东西。我找到了接近的东西,但不是我需要的。
我最近买了一台新电脑,并将所有项目复制到我的新电脑上。
我打开 Eclipse 并生成一个工作区,然后从 Eclipse 中关闭该工作区并将我的项目复制到工作区/项目文件夹中。
我重新打开 Eclipse,但我的项目根本没有显示在包资源管理器中。
我知道我在正确的目录中有正确的文件夹。
我发现的最接近的线程是: Eclipse - Import an Existing-project?
但甚至这没有帮助,我的项目已经满足了...
我尝试过刷新、重新打开、愚弄工作集等等...
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(19)
仅仅因为工作区目录中有一个项目并不意味着 Eclipse 会打开它,甚至自动看到它。您必须使用文件→导入→常规→现有项目到工作区将您的项目放入Eclipse中。
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 → Existing Projects into Workspace to have your projects in Eclipse.
对于 Juno:(源位于 E:\workspace 中,目标位于 C:\workspace 中)
将项目目录全部复制到工作区目录。
(例如复制E:\workspace\HelloWorld C:\workspace\helloWorld)
启动 Eclipse。
执行:文件 -->导入
选择:常规--> “将现有项目放入工作区”
“下一步>”
选中“选择根目录”
使用“浏览按钮”
选择“C:\workspace”
将会出现现有项目的列表。只需选中粗体(待导入)的项目,然后按“完成”按钮即可。
查看 Package Explorer,您复制的项目现在应该在那里。
For Juno: (With Source in E:\workspace and destination in C:\workspace)
Copy project directory in its entirety to the workspace directory.
(e.g. Copy E:\workspace\HelloWorld C:\workspace\helloWorld)
Start Eclipse.
Perform: File --> Import
Select: General -- > "Existing Project into Workspace"
"Next >"
Check "Select root Directory"
Select with "Browse Button"
Select "C:\workspace"
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.
由于意外关闭 Eclipse,当前工作区的 .metadata 已损坏,因此会出现此问题。因此,如果您遇到此问题,只需执行以下步骤:
创建一个新工作区。
将现有项目导入到新工作区。
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:
我一遍又一遍地遇到同样的问题,目前找到的解决方案适用于
I had the same problem over and over again the solution that a have found works for now
Netbeans 允许您进行简单的文件复制。
如您所知,Eclipse 并不是这样工作的。您必须显式“导入”文件和项目。
如果您执行导入,并且没有问题,那么它们应该出现。
我会考虑:
a) 备份现有工作区
b) 删除并重新安装 Eclipse
c) 尝试另一个“测试导入”
Netbeans allows you to do a simple filecopy.
As you know, Eclipse doesn't work like that. You must explicitly "import" files and projects.
If you do import, and if there are no problems, then they should show up.
I'd consider:
a) making a backup of your existing workspace
b) deleting and reinstalling Eclipse
c) Trying another "test import"
您将它们放在
workspace/projects
文件夹中。您应该将它们直接放入workspace
文件夹中,然后执行“将现有项目导入到工作区”操作。You put them in the
workspace/projects
folder. You should put them directly in theworkspace
folder and then do an Import Existing Projects into workspace.在 Eclips 中的包资源管理器
右键单击任何可查看的项目并选择显示于 ->项目资源管理器
包资源管理器 ->右键单击->在 ->Project Explorer 中显示,
您应该能够看到 Eclipse 工作区中所有导入的项目
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
甚至我也观察到类似的问题。由于某种原因,我关闭了 Eclipse 项目,并且在重新启动时,即使相应的文件存在,我添加的一些文件在资源管理器中也不可见。
以下解决方案对我有用:
选择整个工作区(Ctrl+A)==>右键单击并按刷新。
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.
或者您可以尝试:
Or you could try:
由于我从“git clone”导入了我的项目,因此我必须选择“文件”->“导入”->“导入”。 Git->来自 git 的项目->现有本地存储库
As I had imported my project from a "git clone", I had to select File->Import-> Git->Project from git -> Existing local repository
这是我从互联网下载项目时遇到的一个具体问题。
希望这有帮助:)
Here's a specific problem I ran into when downloading a project from the internet.
Hope this helps :)
以下内容对我有用。
eclipse,右键选择导入。
结束。
这将创建所需的元数据和其他内部 Eclipse 项目文件系统,它将显示您的项目文件。
您还可以直接将项目作为文件系统导入。如果无法直接导入,请按照上述步骤操作。
The following worked for me.
eclipse, right click and select import.
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.
您好,我也遇到了同样的问题,我尝试了很多选项,但最后最简单的方法是,单击 ProjectExplorer-> 中存在的向下箭头自定义视图->过滤器->未经检查的关闭项目。
并且能够看到所有已关闭的项目。
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.
我已经尝试了许多建议的选项,但最后在新工作区中导入项目解决了我的问题。
我认为旧工作区中的元数据文件存在一些问题。
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.
我只想在上述答案中添加一个重要细节。即使您从选择的根目录导入项目,它们也可能不会以粗体显示,因此您将无法选择它们。其原因可能是项目的元数据已损坏。如果您确实遇到此问题,那么最简单、最快的解决方法是删除工作区文件夹并创建一个新的文件夹,然后将项目文件夹(在删除旧工作区之前执行此操作)复制+粘贴到这个新工作区。然后,在您的新工作中,按照之前的帖子所述导入项目。
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.
是的......我有点明白你需要什么。我刚刚遇到同样的问题。
这正是我所做的。现在,请记住,这是一些低级知识,因为我才刚刚开始。我让我的生活变得复杂,所以我需要解决方案。我自己使用上述答案的不同方向找到了它。
我从 HDD 上的 win 10 切换到 SSD 上的 linux,因此我需要将一些 .class 和 .java 导入到新工作区中。
首先我犯了一个错误,没有在Windows上使用导出选项,我只是简单地将所有文件从win 10上的src和bin文件夹复制到linux上的src和bin文件夹。当然,工作区没有看到这些文件。
在导入工具中找到了解决方案(我应该立即使用它)。
我将 src 文件夹中的所有文件放入 zipp 文件中,并将该文件移动到某个任意文件夹(在我的情况下是主文件夹)。
返回到 src 文件夹并删除所有 .java 文件(您将不再需要它们)。
然后我打开空项目并从 Eclipse 的“文件”菜单中选择“导入”。
在导入窗口中,在选项常规(第一个)下选择导入存档。
现在只需找到您的 zip 文件,瞧!一切都在它应该在的地方。
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).
I put all of files in src folder into zipp file, and moved this file to some arbitrary folder (Home folder in my case).
Go back to src folder and delete all of .java files (you won't be needing them anymore).
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.
Now simply find your zip file, and Voila! All is where it should be.
问题:创建 PyDev 项目后,该项目不会显示在“PyDev Package Explorer”中;(
解决方案:这就是我在“Project Explorer”中查看它们的方法:
我正在使用 Eclipse IDE 2019-12,
单击“右上角的“资源”图标
现在您将看到所有项目都显示在“Project Explorer”中。
棘手的注意事项:现在如果您单击“PyDev”图标,您将看到“PyDev”中显示的项目较少包浏览器”魔法?
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?
我做错了什么,我使用了“导入”-> “文件夹或存档中的项目”,因为我认为这是同一件事。您必须使用“将现有项目放入工作区”。也许这对某人有帮助。
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.
我遇到了同样的问题,我只需单击窗口 ->显示视图->然后是项目浏览器。
然后我得到了我的 Eclipse 工作区中的项目。
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.