在工作区/项目中放置项目文件后,Eclipse项目不会出现。

时间:2021-08-10 21:29:45

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.

我打开Eclipse并生成一个工作区,然后关闭Eclipse并将我的项目复制到工作区/项目文件夹中。

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

我重新打开Eclipse,并且我的项目不会出现在包浏览器中。

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?

我发现的最近的线程是:Eclipse -导入一个现有的项目?

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

但即使这样也无济于事,我的项目已经满足了……

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

我尝试过让人耳目一新,重新开放,和工作环境混在一起,等等……

13 个解决方案

#1


74  

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.

仅仅因为在工作空间目录中有一个项目,并不意味着Eclipse打开它,或者甚至自动看到它。您必须使用File - Import - General - Import现有项目到工作区中,以使您的项目处于Eclipse中。

#2


11  

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

Juno:(在E:\工作区和目的地C:\workspace中)

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

    将项目目录复制到工作区目录。(如复制E:\ workspace \ HelloWorld C:\ workspace \ HelloWorld)

  2. Start Eclipse.

    启动Eclipse。

  3. Perform: File --> Import

    执行:文件- - >导入

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

    选择:General——>“现有项目进入工作区”

  5. "Next >"

    “下一个>”

  6. Check "Select root Directory"

    检查“选择根目录”

  7. Select with "Browse Button"

    选择“浏览”按钮

  8. Select "C:\workspace"

    选择“C:\工作区”

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

    将会出现一个现有项目的列表。只需检查那些粗体(导入)的按钮,然后按“Finish”按钮。

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

检查包资源管理器,您的复制项目现在应该在那里。

#3


9  

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:

这个问题出现了。当前工作空间的元数据已经被损坏,因为它意外地关闭了Eclipse。因此,如果你面对这个问题,只需做以下步骤:

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

    创建一个新的工作区。将现有项目导入新的工作区。

you made it!

你成功了!

#4


5  

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

我一直都有相同的问题,a已经找到的解决方案。

  1. Close Eclipse.
  2. 关闭Eclipse。
  3. go to workspace.metadata.plugins
  4. 去workspace.metadata.plugins
  5. remove org.eclipse.core.resources
  6. 删除org.eclipse.core.resources
  7. Start Eclipse
  8. 启动Eclipse
  9. Do File->Import
  10. 文件- >导入吗
  11. General->Existing Projects into Workspace and import all the project from the workspace
  12. General->现有项目进入工作区,并从工作区导入所有项目。

#5


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.

    Netbeans允许您做一个简单的filecopy。正如您所知道的,Eclipse不像那样工作。您必须显式地“导入”文件和项目。

  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

    a)对现有工作空间进行备份。

    b) deleting and reinstalling Eclipse

    b)删除和重新安装Eclipse。

    c) Trying another "test import"

    c)尝试另一个“测试导入”

#6


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.

将它们放在工作区/项目文件夹中。您应该将它们直接放在工作区文件夹中,然后将现有项目导入工作区。

#7


1  

Or you could try:

或者你可以试试:

  1. Go to File -> Switch Workspace
  2. 切换到文件->切换工作区。
  3. Select your workspace (if shown)
  4. 选择您的工作区(如果显示)

#8


1  

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

在Eclips中,Package Explorer右键单击任何可查看的项目,并选择Show in -> project Explorer。

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

Package Explorer ->右击->显示在->项目浏览器。

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

您应该能够在Eclipse工作区中看到所有导入的项目。

#9


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. 如果你的拉链拉上了,你一定要把拉链拉好,有时候你会得到一个额外的等级。
  3. Make sure you place the project in the project file, not directly in workspace.
  4. 确保将项目放置在项目文件中,而不是直接在工作区中。
  5. 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.
  6. 查看.project和.classpath是否被重命名为_project和_classpath。您不能直接重命名它们,因此打开一个名为.classpath的文本文档,并在其中粘贴_classpath的内容,保存为所有文件,而不是.txt。类路径可以用记事本打开。
  7. Import the project from the file workspace. It will look for a folder called projects, your's should be inside it.

    Hope this helps :)
  8. 从文件工作区导入项目。它会寻找一个叫做projects的文件夹,你的应该在里面。希望这有助于:)

#10


0  

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

当我从一个“git克隆”导入我的项目时,我必须从git ->现有的本地存储库中选择File->Import-> git ->项目。

#11


0  

The following worked for me.

以下是我的工作。

  • Create a new project in eclipse.
  • 在eclipse中创建一个新项目。
  • After creating a new project in eclipse, right click and select import.
  • 在eclipse中创建一个新项目之后,右键单击并选择import。
  • General Import > File System
  • 一般进口>文件系统。
  • Select all the folders under your project except the root one. Click finish.
  • 选择项目下的所有文件夹,除了根目录。单击finish。

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

这将创建所需的元数据和其他内部eclipse项目文件系统,该系统将显示您的项目的文件。

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

您还可以将项目直接导入到文件系统中。如果不能直接导入,请按照上面的步骤操作。

#12


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.

你好,我也遇到了同样的问题,我尝试了很多选择,但最后最简单的方法是,点击下面的箭头显示在ProjectExplorer->自定义视图->过滤器->不受限制的关闭项目。

And will able to see all closed projects.

能够看到所有的封闭项目。

#13


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.

我认为旧工作区中的元数据文件存在一些问题。

#1


74  

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.

仅仅因为在工作空间目录中有一个项目,并不意味着Eclipse打开它,或者甚至自动看到它。您必须使用File - Import - General - Import现有项目到工作区中,以使您的项目处于Eclipse中。

#2


11  

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

Juno:(在E:\工作区和目的地C:\workspace中)

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

    将项目目录复制到工作区目录。(如复制E:\ workspace \ HelloWorld C:\ workspace \ HelloWorld)

  2. Start Eclipse.

    启动Eclipse。

  3. Perform: File --> Import

    执行:文件- - >导入

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

    选择:General——>“现有项目进入工作区”

  5. "Next >"

    “下一个>”

  6. Check "Select root Directory"

    检查“选择根目录”

  7. Select with "Browse Button"

    选择“浏览”按钮

  8. Select "C:\workspace"

    选择“C:\工作区”

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

    将会出现一个现有项目的列表。只需检查那些粗体(导入)的按钮,然后按“Finish”按钮。

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

检查包资源管理器,您的复制项目现在应该在那里。

#3


9  

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:

这个问题出现了。当前工作空间的元数据已经被损坏,因为它意外地关闭了Eclipse。因此,如果你面对这个问题,只需做以下步骤:

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

    创建一个新的工作区。将现有项目导入新的工作区。

you made it!

你成功了!

#4


5  

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

我一直都有相同的问题,a已经找到的解决方案。

  1. Close Eclipse.
  2. 关闭Eclipse。
  3. go to workspace.metadata.plugins
  4. 去workspace.metadata.plugins
  5. remove org.eclipse.core.resources
  6. 删除org.eclipse.core.resources
  7. Start Eclipse
  8. 启动Eclipse
  9. Do File->Import
  10. 文件- >导入吗
  11. General->Existing Projects into Workspace and import all the project from the workspace
  12. General->现有项目进入工作区,并从工作区导入所有项目。

#5


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.

    Netbeans允许您做一个简单的filecopy。正如您所知道的,Eclipse不像那样工作。您必须显式地“导入”文件和项目。

  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

    a)对现有工作空间进行备份。

    b) deleting and reinstalling Eclipse

    b)删除和重新安装Eclipse。

    c) Trying another "test import"

    c)尝试另一个“测试导入”

#6


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.

将它们放在工作区/项目文件夹中。您应该将它们直接放在工作区文件夹中,然后将现有项目导入工作区。

#7


1  

Or you could try:

或者你可以试试:

  1. Go to File -> Switch Workspace
  2. 切换到文件->切换工作区。
  3. Select your workspace (if shown)
  4. 选择您的工作区(如果显示)

#8


1  

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

在Eclips中,Package Explorer右键单击任何可查看的项目,并选择Show in -> project Explorer。

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

Package Explorer ->右击->显示在->项目浏览器。

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

您应该能够在Eclipse工作区中看到所有导入的项目。

#9


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. 如果你的拉链拉上了,你一定要把拉链拉好,有时候你会得到一个额外的等级。
  3. Make sure you place the project in the project file, not directly in workspace.
  4. 确保将项目放置在项目文件中,而不是直接在工作区中。
  5. 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.
  6. 查看.project和.classpath是否被重命名为_project和_classpath。您不能直接重命名它们,因此打开一个名为.classpath的文本文档,并在其中粘贴_classpath的内容,保存为所有文件,而不是.txt。类路径可以用记事本打开。
  7. Import the project from the file workspace. It will look for a folder called projects, your's should be inside it.

    Hope this helps :)
  8. 从文件工作区导入项目。它会寻找一个叫做projects的文件夹,你的应该在里面。希望这有助于:)

#10


0  

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

当我从一个“git克隆”导入我的项目时,我必须从git ->现有的本地存储库中选择File->Import-> git ->项目。

#11


0  

The following worked for me.

以下是我的工作。

  • Create a new project in eclipse.
  • 在eclipse中创建一个新项目。
  • After creating a new project in eclipse, right click and select import.
  • 在eclipse中创建一个新项目之后,右键单击并选择import。
  • General Import > File System
  • 一般进口>文件系统。
  • Select all the folders under your project except the root one. Click finish.
  • 选择项目下的所有文件夹,除了根目录。单击finish。

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

这将创建所需的元数据和其他内部eclipse项目文件系统,该系统将显示您的项目的文件。

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

您还可以将项目直接导入到文件系统中。如果不能直接导入,请按照上面的步骤操作。

#12


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.

你好,我也遇到了同样的问题,我尝试了很多选择,但最后最简单的方法是,点击下面的箭头显示在ProjectExplorer->自定义视图->过滤器->不受限制的关闭项目。

And will able to see all closed projects.

能够看到所有的封闭项目。

#13


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.

我认为旧工作区中的元数据文件存在一些问题。