Dave's Brain

Browse - Programming Tips - How do I exclude a file or folder from my Eclipse source?

Date: 2010jun10
Product: Eclipse

Q.  How do I exclude a file or folder from my Eclipse source?

A.  A quick way:

- Right-click on the offending item (Can be a file or folder) - Select Java Build Path > Exclude
This adds an "exclude pattern" to your project the "pattern" is the exact path to the file or folder you right-clicked on. To add a general pattern you can do:
- Project > Properties > Java Build Path > Source - Click on "Excluded" - Click on "Edit" - Click on "Add"
I like to add these exclude patterns:
**/*.Old **/Old/ Trailing slash is required
These will get Eclipse to ignore all files with ".Old" extension and all folders called "Old".

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.