eclipse 自动编译仅创建包 - 不创建类文件

发布于 2024-10-20 12:19:27 字数 161 浏览 6 评论 0原文

我不确定发生了什么事。我已执行以下操作来排除故障: 验证构建路径没有错误 未选中“发生构建路径错误时中止构建” 将“不完整的构建路径”和“循环依赖项”设置为错误警告 经核实,没有排除任何情况。

这让我难住了。 我唯一做的就是与 svn repo 同步,并且我使用 subversive 插件

I am not sure what happened. I have done the following to troubleshoot:
verify the buildpath has no errors
unchecked "abort build when buildpath error occurs"
set "incomplete buildpath" and "circular dependencies " to warning from error
verified that there are no exclusions.

This has me stumped.
The only thing i did was synchronize with the svn repo, and I use subversive plugin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

肤浅与狂妄 2024-10-27 12:19:27

可能的原因之一可能是您的项目没有“Java Builder”...要检查它,请转到此处,

Project Preferences > Builders

您会看到该项目的所有构建器,这里有“Java Builder”检查了吗?如果您不这样做,那么在最好的情况下您可以尝试按“新建...”并在那里选择它;否则,您可以打开 .project 文件并在 块中.. 添加以下内容:

<buildSpec>
    ...
    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    ...
</buildSpec>

在 Eclipse 重新加载后,您将看到 Java Builder,它应该编译您的类。

但这是我通常会遇到的情况;)否则请检查您的构建器,也许看看项目首选项中的“Project Natures”(至少应该检查obj.eclipse.jdt.core.javanature) 。

只是希望它能解决您的问题

one of the possible reason can be that your project does not have 'Java Builder'... to check it go to the

Project Preferences > Builders

here you see all builders of the project, do you have here 'Java Builder' checked? if you don't, then in best case you can try to press 'New...' and choose it there; otherwise you can open .project file and in block <buildSpec> .. </buildSpec> add the following:

<buildSpec>
    ...
    <buildCommand>
        <name>org.eclipse.jdt.core.javabuilder</name>
        <arguments>
        </arguments>
    </buildCommand>
    ...
</buildSpec>

after Eclipse reloading you will see Java Builder and it should compile your classes.

But this is what typically happens to me ;) Otherwise check your builders, maybe take a look at 'Project Natures' in project preferences (obj.eclipse.jdt.core.javanature should be at least checked).

Just hope it solves your issue

烟火散人牵绊 2024-10-27 12:19:27

您是否尝试过清理该项目? Eclipse 允许清理构建状态(即删除所有类等并再次创建它们)。在这种情况下它会有所帮助。

请注意,Eclipse Java 编译器是增量编译器。我不太了解,但是某些图元文件可能是错误的,并且 Eclipse 编译器可以认为所有内容都已编译。

Have you tried to clean the project? Eclipse allow to clean the build state (i.e. remove all classes etc. and create them again). It can help in such situations.

Note that the Eclipse Java compiler is an incremental compiler. I don't know it deeply, but some metafiles might be wrong and the Eclipse compiler can think that everything has been compiled.

深空失忆 2024-10-27 12:19:27

好的。我发现 .class 文件确实正在生成,但由于设置过滤了 .class 文件,因此在导航器视图中不可见。以前不是这种情况,所以我认为它要么更改为 Eclipse 默认设置,要么发生了 svn 更新。 Eclipse 在哪里存储导航器视图配置的设置?

ok. I found that the .class files are indeed being generated, but not visible in the navigator view due to setup filtering out .class files. This was not the case before so I am thinking its either change to the eclipse default setting or something that happened with a svn update. Where does eclipse store the settings for Navigator View configuration ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文