I'm trying to divide my project into a sensible hierarchy. This is what I want:

MyProject
MyProject/src ................................. where all the source files are (no further directories)
MyProject/classes
MyProject/classes/Main.class
MyProject/classes/classes2 ................ sorry for not being creative XD
MyProject/classes/classes2/Age.class

Now, Age uses Main, and this is where the trouble is. I'm using javac directly to compile Age, and this is how I'm doing it:

If Main is not in a package (which it appears not to be), then it cannot be referenced by any class that is in a package. If Main is in a package, then you'll need to refer to it by it's fully-qualified name (or import it as such) if it's not in the same package as the class that's referring to it, and Main.class will have to be in a directory that corresponds to its package.