Le mardi 9 juillet 2013 12:44:15 UTC+2, David Bernard a écrit :
Hi,
It's an eclipse requirement (not a java) for source layout.
I'm no longer use dot in package, because it's a pain when you navigate in source outside of ide (file manager, github,...). I use '_' => flat layout like with '.' in IDE.
my 2c.
Yes, I was looking at this, and the requirement is only for class files:
"You should arrange source files in a directory tree that reflects their
package tree. For example, if you keep all your source files in
/workspace, the source code for com.mysoft.mypack.MyClass should be in
/workspace/com/mysoft/mypack/MyClass.java." -- man javac
The key word is 'should'.
I have been using Java for -way too many- years, and I don't think I ever knew this one.
I guess my misconception comes from the fact that javac (with the default options) would not put the class files in the correct folder structure if the source folder is not right:
"By default, the compiler puts each class file in the same directory as
its source file. ..." - man javac
Knowing this, the limitation in Eclipse is really ugly ...
Luc