i can load a class using the
file protocol.
i can
not load the same class with
ftp
protocol.
this code works correctly:
String path = "/home/ftp/a.jar";
File dir = new File(path);
URL url = dir.toURL();
URL[] url_path = new URL[]{url};
URLClassLoader loader = new URLClassLoader(url_path);
Class c = loader.loadClass("hello");
now, if i change:
URL url = dir.toURL();
to
URL url = new URL("ftp://10.36.0.2/a.jar");
i get
ClassNotFoundException.
yet, to test the validity of the
URL, i type:
ftp://10.36.0.2/a.jar
into a browser. and the file is found correctly.
my
guess is that this is some kind of
security issue??
i have no security policy, so how can i disable it
if this is the problem?
thanks