What is the difference between the src
folder and the bin
folder in an Eclipse project? They both seem the same, however, src
uses .java files whereas bin
uses .class files. Why is this? What difference do they have?
The src stands for source. The /src folder comprises of the raw non-minified code. The /src folder is used to store the file with the primary purpose of reading (and/or editing) the code. The /src folder contains all the sources, i.e. the code which is required to be manipulated before it can be used.
Describes the Java™ source tree. When you create an API project, it is set up as a Java project with separate folders for source and class files. The source folder is named src . It contains the Java code of the application.
The word 'src' is a common abbreviation for 'source' ... e.g. a project's source code. In an Eclipse project 'src' is a common default folder name for a project's source code ... though it depends on how the Eclipse project was created or instantiated.
The bin folder can be ignored. This is nothing more than the folder in which Eclipse stores the . class files generated by compiling your code (which it does automatically; see compiling). The source folder is where all of your Java files will be saved.
src
files are your raw, human-readable source code (in this case, .java
).
bin
files are your compiled code (in this case, .class
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With