You've just described separate programs that happen to be bundled together (in the same jar presumably).
Each invocation of the jvm requires that you specify the class for which a single static main exists. The other classes containing other static mains are irrelevant.
Each invocation of the jvm requires that you specify the class for which a single static main exists. The other classes containing other static mains are irrelevant.