 <p>Have you tried</p> <pre><code>Class.forName("com.foo.Foo"); </code></pre> <p>Edit: To invoke the static method, you will need to do something like:</p> <pre><code>Class clazz = Class.forName("com.foo.Foo"); Method method = clazz.getMethod("methodName", String.class); Object o = method.invoke(null, "whatever"); </code></pre> <p>This will depend on your method and its parameters. See the reflection tutorial for more on this: <a href="http://docs.oracle.com/javase/tutorial/reflect/" rel="nofollow">http://docs.oracle.com/javase/tutorial/reflect/</a> </p>