how to set default main class in java?

In the jar file you could just add this to your manifest.mft

Main-Class : A

The jar file would then be executable and would call the correct main.

On how to do this in Netbeans you can look at this: Producing executable jar in NetBeans

Leave a Comment