开发者

How to reproduce bin folder in Eclipse after it is deleted?

开发者 https://www.devze.com 2022-12-15 17:43 出处:网络
I\'m switching out of Net Beans (since Netbeans intellisense speed was too fast for my patience). However, my habit since NetBeans age driving me nut with new Eclipse.

I'm switching out of Net Beans (since Netbeans intellisense speed was too fast for my patience). However, my habit since NetBeans age driving me nut with new Eclipse. Normally, when some thing is wrong inside Netbeans auto compile mechanism, I just go to build folder located under the project root and delete it (sometimes with Unlocker), then Net Beans will recreated that folder and put .class file into. However, recently, when I tried to do the same thing with bin folder und开发者_运维百科er Eclipse project root, the bin folder will not be reproduced, even if I restart the IDE, turn off Build Automatically, and run Build All (Ctrl+B).


In the menu, don't turn off automatic build and click Project > Clean...


It's possible that bin is not your class output folder. You should check in Project properties|Java Build Path|Source.


Possibly not related to this problem, but something you need to be aware of is that Eclipse lies about the contents of its folders. More precisely, it reports the contents of internal models of all folders (i.e. contained files and sub-folders) and only refreshes that internal view when you explicitly refresh the view in the GUI.

Especially when you manipulate files outside of Eclipse or using tools started from Eclipse but not directly tied into Eclipse, there WILL be differences Eclipse doesn't know about.


Another possibility is that your project does not have "Java nature." Are you seeing source packages in the Package Explorer?

If not, this stanza should appear (or go) in your .project file:

<natures>
    <nature>org.eclipse.jdt.core.javanature</nature>
</natures>


Have you tried to recreate the bin folder directly on the file system and performed a refresh on the eclipse project?


Make sure that your .project file should contain at minimum:

</projects>
    <buildSpec>
        <buildCommand>
            <name>org.eclipse.jdt.core.javabuilder</name>
            <arguments>
            </arguments>
        </buildCommand>
    </buildSpec>
    <natures>
        <nature>org.eclipse.jdt.core.javanature</nature>
    </natures>

PS. For standard java project

0

精彩评论

暂无评论...
验证码 换一张
取 消