Eclipse 包资源管理器为空
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13992661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse package explorer empty
提问by Code Monkey2
I'm new to Eclipse, and I can't seem to get the package explorer to cooperate. Here is my current file tree:
我是 Eclipse 的新手,我似乎无法让包浏览器合作。这是我当前的文件树:
└───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?
我试图在当前树\workspace、\workspace\src 和workspace\src\var 中启动一个工作区。所有结果都导致一个空的包浏览器。我尝试过 Eclipse Indigo、Juno、Classic Indigo 和 Classic Juno,但都没有成功。任何人都可以提供帮助吗?
回答by Ludwik
Maybe a little late, but i found a solution to this problem! Just right click on the explorer, select import, then in generalselect Existing project into workspacethen find the root folder of your project and it should import it just fine. Well, worked for me anyways ;)
也许有点晚了,但我找到了解决这个问题的方法!只需右键单击资源管理器,选择import,然后通常选择Existing project into workspace然后找到项目的根文件夹,它应该可以导入它就好了。好吧,无论如何都对我来说有效;)
回答by MrSmith42
- Rightclick on your Project
- select 'Properties'
- 'Java Build Path'
- select tab 'Source'
- Button 'Add Folder'
- add your source folder / all your source folders
- 右键单击您的项目
- 选择“属性”
- 'Java 构建路径'
- 选择标签“来源”
- 按钮“添加文件夹”
- 添加您的源文件夹/所有源文件夹