The following statements seem to be violated:
robert@neghvar :~/tmp> cat org/foo/Bar.java public class Bar { } robert@neghvar :~/tmp> javac org/foo/Bar.java robert@neghvar :~/tmp> javap org.foo.Bar Compiled from "Bar.java" public class org.something.Bar extends java.lang.Object{ public org.something.Bar(); }
Although the Bar class file is in the org/foo directory and declares the org.something package, the compiler does not complain. I got the impression that java required a directory hierarchy that follows the package name. I was wrong? If so, what are the consequences of mixing package names?
source share