I've been trying to write a Java 9 module, but no matter what I do, I get the error "package is empty or does not exist". I've tried searching online for the expected directory layout, and tried every variation on directory layout I can think of, but nothing works.
For example, here is one layout I tried
bar.foo/module-info.java
module bar.foo {
exports bar.foo;
}
bar.foo/bar/foo/wtf.java
package bar.foo;
public class wtf {
}
However, compilation still gives the same error as usual.
> javac bar.foo/module-info.java
bar.foo/module-info.java:2: error: package is empty or does not exist: bar.foo
exports bar.foo;
^
1 error