as we suppose i am creating a java project with the following classes
com.bharani.ClassOnecom.bharani.ClassTwocom.bharani.helper.HelperOnecom.bharani.helper.support.HelperTwo
with files placed directly under the 'src' folder
- CSI /ClassOne.java
- CSI /ClassTwo.java
- CSI /HelperOne.java
- CSI /HelperTwo.java
and compile them with the command
$ javac -d classes src / *. java (assuming class directory exists)
The compiler compiles these files and puts the class files in the appropriate subdirectories inside the "classes" directory, like this
- Classes / com / Bharani / ClassOne.class
- Classes / com / Bharani / ClassTwo.class
- Classes / com / Bharani / helper / HelperOne.class
- Classes / com / Bharani / helper / support / HelperTwo.class
Because the specification indicates that classes should be included in the appropriate directory structure. Good.
My question is:. When I use an IDE such as Eclipse or NetBeans, they also create a directory structure for the source code directory (here also the src directory). Why is this? It is necessary? Or is it just a convention?
Thanks.
java conventions directory-structure
bdhar
source share