Witam
classPath = new URL[]{ new URL("file://E:/")};
...
programClass = classLoader.loadClass(genName);
I to dziala.
Ale jesli dam
classPath = new URL[]{ new URL("file://E:/katalog")};<code>
To juz nie widzi klasy do zaladowania. Dlaczego?
Witam
classPath = new URL[]{ new URL("file://E:/")};
...
programClass = classLoader.loadClass(genName);
I to dziala.
Ale jesli dam
classPath = new URL[]{ new URL("file://E:/katalog")};<code>
To juz nie widzi klasy do zaladowania. Dlaczego?
folly_niezalogowany napisał(a)
classPath = new URL[]{ new URL("file://E:/katalog")};
nie testowałem tego ale może dodaj / na końcu ?
Nie dostajesz żadnego SecurityException ?
Podejrzewam ze uzyty jest URLClassLoader, zatem za API:
"This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories. Any URL that ends with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a JAR file which will be opened as needed."
Zatem, poprzedni post daje rozwiazanie problemu.