I have a problem with using ClassLoader. Snippet of my code:
[...]
Class<?> appletClass = classLoader.loadClass("path.to.Applet123");
Applet applet = (Applet) appletClass.newInstance();
applet.init();
applet.start();
[...]
And Applet123 class isn't mine, so I can't edit it. But I know, that in the class Applet123 is something like this:
public void init() {
System.out.println(getParameter("myParameter"));
}
Unfortunately it prints null
.
What have I to add to my code to load Applet123.class with parameter myParameter
containing String e.g. "Hello"?
Thanks for replies.