"packageless" class is a misnomer.
All Java classes belong to some package or other, but if you don't explicitly declare one, the class is compiled into the default package. And, as Peter mentioned, that's a very bad idea.
On small Ant projects, the usual layout would be to put the build.xml in the project's root directory, create a "src" directory to hold the java source tree and a "classes" directory to hold the compiled classes. It's important to keep source files separate from the set of synthesized files (compiled classes), since otherwise you risk accidentally erasing important things when you clean the project.
In Java, the package name is a critical part of both the source and compiled filenames. While you
can compile a file whose package name is "com.javaranch.project1" and whose location is directory under "src", the output class
will be placed under "classes/com/javaranch/project". And you may get a compiler warning for not placing the source class in "src/com/javaranch/project".
More than one class in a project can contain a "public static Main(
String[] args)" method. There is no language-defined way to determine which class should be used as the actual main class. Therefore you must explicitly define that main class, which you do either on the command line, or via the Main-Class manifest in the jar you create using the "classes" directory as its contributor. And, since there can be classes named "MyMainClass" in more than one package (although I don't recommend it!), you must provide the fully-qualified classname (including absolute package) in your manifest. Like so: