> It is much simpler than that !
>
> URLClassLoader cl = new URLClassLoader("file:/d:/examples/temp/");
> Object o = Class.forName("mypackage.MyClass", true, cl).newInstance();
>
> will load mypackage.MyClass from D:\examples\temp\mypackage\MyClass.class !
>
> Arne
Indeed

thx. I've tried this but I used toURL() as a argument to
URLClassLoader (it takes URL[]) - but this toURL() is deprecated
starting from v.1.5, bur as You wrote I can use simply a string:
URLClassLoader(new URL[] {new URL("file:/d:/examples/temp/")});
But could you tell me what I did wrong in case of defining my
ClassLoader?
Best regards,
M.