[英]Eclipse not creating new .java file in New Project wizard?
OK, I have a really basic (read stupid) question.好的,我有一个非常基本的(读起来很愚蠢)问题。 I am just beginning Java programming, and am using Eclipse 3.7.2.
我刚刚开始 Java 编程,并且正在使用 Eclipse 3.7.2。 I have done a few beginning projects without any problems.
我已经做了一些没有任何问题的开始项目。 All of a sudden, when I create a new project using the wizard, it is not creating the src/.java file.
突然之间,当我使用向导创建一个新项目时,它并没有创建 src/.java 文件。 When I try to manually add it after creating the project, I end up getting some cryptic error messages.
当我在创建项目后尝试手动添加它时,我最终会收到一些神秘的错误消息。
I am at a loss, and have lost a lot of time trying to correct the situation.我很茫然,并且已经浪费了很多时间试图纠正这种情况。 What do I need to do to reenable the creation of a src/.java file in Eclipse?
我需要做什么才能在 Eclipse 中重新启用 src/.java 文件的创建?
Screenshots (click on image for full size):截图(点击图片查看大图):
Make sure you are choosing a java project from the right folder in the wizard.确保您从向导中的正确文件夹中选择了一个 java 项目。 It sounds like it is creating an android java project, which is probably why your src folder is missing.
听起来它正在创建一个 android java 项目,这可能是您的 src 文件夹丢失的原因。 See if there is a helloworld project under example projects too in the wizard, that may get you started too.
查看向导中的示例项目下是否也有一个 helloworld 项目,这也可以帮助您入门。 Screenshot may help us.
屏幕截图可能对我们有所帮助。 I want to see which project type you choose and which folder it is in.
我想看看您选择的项目类型以及它所在的文件夹。
How about changing eclipse to point to a new workspace.如何将 eclipse 更改为指向新的工作区。 That may drop the android settings.
这可能会删除android设置。 Under the file menu, choose switch workspace and pick a new location.
在文件菜单下,选择切换工作区并选择一个新位置。 Thats most likely why a new install did not fix it.
这很可能是新安装无法修复它的原因。 That workspace may have android settings in it, so change to a new folder somewhere else to test it like c:\workspace2\
该工作区中可能包含 android 设置,因此请更改为其他地方的新文件夹以对其进行测试,例如 c:\workspace2\
Here's a good tutorial I found that may help too.这是我发现的一个很好的教程,它也可能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.