If you want it to find those files automatically without having to specify them, you'll need to be in the package root, so run this from within src
:
javac server/*.java
That would then work.
However, personally I would always specify all the code you want to build, rather than letting javac
pick up extra bits. If you want to build the common
code first, I'd do so and then add a classpath entry so that javac
will pick up the compiled classes rather than the source code.
(Alternatively, I'd spend most of the time in an IDE where it's largely automatic, and then use a fuller build system such as Ant to do the actual building.)