tags:

views:

145

answers:

5

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 under 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).

A: 

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

perdian
A: 

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

Gregory Pakosz
It does some help. But the xml files that I created inside src folder are not copied to bin folder.
Phương Nguyễn
Note my other comment. If these files were created outside of Eclipse, Eclipse won't be aware of them until you F5.
Carl Smotricz
Can you have a look at this screen shot: http://seamoo.com/Eclipse-Screen-3.jpg. I think Eclipse is keeping track of these xml files. I press F5 (and Context Menu>Refresh) several times but it doesn't help.
Phương Nguyễn
A: 

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.

Carl Smotricz
+1  A: 

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

Carl Smotricz
This should do it, Eclipse will automatically create and hide your output folder (it's filtered by default). You can customize the filters if you want to show it.
Malaxeur
I think that bin should be my output folder because when I use Project>Clean... then the folder is re-created (after I deleted it).
Phương Nguyễn
So the folder is being re-created with nothing in it? Have you (a) checked from outside Eclipse and (b) checked for view filtering in Eclipse?
Carl Smotricz
Ouch, I checked Project Properties|Java Build Path and found out that I had added bin to Source list (although at the same time bin was also the output folder). Removing bin from Source entries list solved the problem. Thanks.
Phương Nguyễn
A: 

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>
Carl Smotricz