Call plugin class in Java

Posted by Josh Meredith on Stack Overflow See other posts from Stack Overflow or by Josh Meredith
Published on 2010-03-29T06:39:33Z Indexed on 2010/03/29 6:43 UTC
Read the original article Hit count: 333

Filed under:
|
|

How can I call a class in Java, when the name of the class won't be known at compile time (such as if it were a plugin). For example, from a GUI, a user selects a plugin (a Java class), the application then creates a new instance of the class, and calls one of its methods (the method name would be known at compile time (e.g. "moduleMain")).

Thanks for any input.

© Stack Overflow or respective owner

Related posts about java

Related posts about plugin