You can specify an exception for * .java files in the project properties / Build path / sources. However, in this case * .java will not be copied to the target folder, so these resources will not be available during the implementation path. To get around this, after adding exceptions, you can add a custom builder (for example, Ant script) that will copy * .java files.
Alternatively, you can use m2eclipse with a project with Maven support and put your java files in src / main / resources, so all the files from this folder will not be compiled, but they will be copied to the path to the result classes.
In addition, you can try to specify the target folder in the same directory as the source folder.
source share