So question 194698 shows how to load a jar file at runtime and you can load individual named classes and get a Class object. Now my problem is I want to be able to cast those Classes to the types they really are, but I can't because I can't use an import since the whole point is to load it at runtime rather than compile time.
It seems like the way to go is to use reflection to discover the functions and field names, but that seems brittle since the API in the jar files could change and the code won't break until it is run.
Is there a better way?