C # SLN file-based approach in Eclipse (Java)
In Visual Studio files, C # files are stored in .csproj files. Solutions are just containers for projects (which can be C # / C ++ / VB / ... projects).
The last time I worked with Eclipse, all files under the project root were automatically included. When one of these was excluded from the build, the project file was changed .classpath
:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="ExcludedFile.java" kind="src" path="src"/>
<!-- ... other entries ... -->
</classpath>
You can exclude a file in Eclipse by right-clicking it in Package Explorer
and then selecting Build Path -> Exclude
.
source to share
You will not need to directly edit the .project and .classpath files mentioned in other answers. As with Visual Studio, the IDE creates and owns these project metadata metafiles for you.
For example, you can exclude an individual java file from the build path by right-clicking it in the project explorer and choosing Build Path / Exclude. This will make the necessary changes to the .classpath for you.
source to share