Running java in package from command line

You’d run it as:

java One.Test

… but from the root directory (basic), not from the One directory. You always specify the fully-qualified class name.

Oh, and package names in Java should be lower-case, so it should be one and one.inner, not One and One.Inner. Just a convention, but one which pretty much everyone follows.

Leave a Comment