简体   繁体   English

Eclipse自动编译仅创建软件包,而不创建类文件

[英]eclipse auto-compile only creates packages- not class files

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 我唯一要做的就是与svn repo同步,并且我使用颠覆性插件

one of the possible reason can be that your project does not have 'Java Builder'... to check it go to the 可能的原因之一可能是您的项目没有“ Java Builder” ...要检查它,请转到

Project Preferences > Builders

here you see all builders of the project, do you have here 'Java Builder' checked? 在这里您可以看到该项目的所有构建器,在这里选中'Java Builder'吗? 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: 否则,您可以打开.project文件,并在<buildSpec> .. </buildSpec>添加以下内容:

<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. 重新加载Eclipse之后,您将看到Java Builder,它应该编译您的类。

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). 但这通常是我所要obj.eclipse.jdt.core.javanature事情;)否则,请检查您的构建器,或者看看项目首选项中的“项目性质”(应该至少检查obj.eclipse.jdt.core.javanature )。

Just hope it solves your issue 只是希望它能解决您的问题

Have you tried to clean the project? 您是否尝试过清理项目? Eclipse allow to clean the build state (ie remove all classes etc. and create them again). Eclipse允许清除构建状态(即删除所有类等,然后再次创建它们)。 It can help in such situations. 在这种情况下可以提供帮助。

Note that the Eclipse Java compiler is an incremental compiler. 请注意,Eclipse Java编译器是增量编译器。 I don't know it deeply, but some metafiles might be wrong and the Eclipse compiler can think that everything has been compiled. 我不太了解,但是某些图元文件可能是错误的,并且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. 我发现确实生成了.class文件,但是由于安装程序过滤掉.class文件,因此在导航器视图中不可见。 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. 以前不是这种情况,因此我在考虑将其更改为eclipse默认设置或svn更新时发生的事情。 Where does eclipse store the settings for Navigator View configuration ? eclipse在哪里存储Navigator View配置的设置?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM