How can I load a class that is already on the class path, instantiate it, and also instantiate any inner classes defined within it?
EG:
public class
As a side note, given that your primary question has been answered - often people will declare inner classes as in your example above, without giving a thought to whether they can be static inner classes instead.
In my experience, the vast majority of (non-anonymous) inner classes can be static, as they don't need to access their parent class' instance members. Declaring the inner class as static in this case is both more efficient (as the runtime doesn't need to define a new class for each parent instance), less confusing (since new TestClass().new InnerClass().getClass() != new TestClass().new InnerClass().getClass()) and easier to instantiate if you don't have an appropriate instance of TestClass handy.
So if this applies to you, you could (and arguably should) declare you inner class thusly:
public class TestClass {
public static class InnerClass { }
}
and then you can simply instantiate it as new TestClass.InnerClass().
(If you need to access member fields from within InnerClass, then just ignore all this of course!)