The usual way that everyone does this — until now I have never seen the JAR do something else — is to put the org.foobar.MyClass class in the JAR file in the JAR directory / org / foobar /. I can’t imagine a good reason to do something differently, as this will prevent the normal use of this JAR by anyone who doesn’t do unusual things.