File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Non-Java files not copied to bin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Non-Java files not copied to bin" Watch "Non-Java files not copied to bin" New topic

Non-Java files not copied to bin

Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 41

Hi All,

I have an eclipse project setup which contains files of type .java, .properties, .xml, .png, etc. Surprisingly, only class files of the corresponding .java files are copied to /bin directory. No other non-java files such as .properties, .xml, .png etc. are not copied.
What could be the reason for this? I am using Eclipse-Galileo and jdk 1.6. Please help me in this regard.

Omkar V S
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170

This is strange. Whenever you "build" it copies such resources.
How are you confirming they are not copied. Did you refresh the project view?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Omkar Shetkar
Ranch Hand

Joined: Jun 22, 2006
Posts: 41

I cleaned the project and built it. But the same problem.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15957

The "bin" directory is just the default location for the Java compiler to place compiled classes. It is not a "build" directory.

If you want to use it as a build directory, you would have to set up builders to copy the non-class files (note I said non-CLASS, not non-Java!).

More commonly, there's separate build directory and you copy both the non-class files and the class files into that directory and (usually) then use that directory as the source for creating WAR or JAR file or something similar.

I actually don't bother to configure Eclipse for that, since I have a policy that the IDE is for development, but builds should be doable without needing an IDE, so I use Eclipse to launch Maven or Ant and let them handle the job.

Customer surveys are for companies who didn't pay proper attention to begin with.
It is sorta covered in the JavaRanch Style Guide.
subject: Non-Java files not copied to bin
Similar Threads
Which hibernate property is causing the existing data to be deleted?
Hot deployment problems
Using Spring from web app- class not found exception
Runnable jar is not including the files
Eclipse. Deleting my xml files?