> Well the classes have both package and class name (eg the ls command) .
> But i have the same problem
> when i try to run commands that do not belong to the shell (e.g the by
> command or the get command). Maybe there should be a way to look only
> into the filename.jar instead or to isolate the client from the rest of
> classpath.
>>Well the classes have both package and class name (eg the ls command) .
>>But i have the same problem
[quoted text clipped - 5 lines]
> I'm sorry but I don't really understand what you are saying here. "ls" is a
> Unix command, for instance, not (as far as I know) a class.
The shell has it's own class loader. It also has built in commands that
imitate
the standard Unix commands ls, cd etc.. With this class loader it can
also load
the entry points (i think this is the correct term for classes
containing the main method)
of other jar files, as long as they are defined in the same class
path. This is how it loads
my program.
> But still, since you seem to say that the shell is finding classes that it
> should not, it sounds as if you have put /your/ classes on /its/ classpath, and
Well this is the problem :/. The FTP client also must use commands like
ls and cd.
And i thought that the best approach would be to make them classes that
can be
loaded from my class loader.
> if you can avoid doing that then the problem will only occur when there is an
> actual name clash. In that case -- as I suggested -- you may (but remember
Not exactly. You see i also have classes in my FTP client for the put
command, the
get command and the by command. Those classes don't exist in the shell.
Shouldn't
they work ok? This is that makes me believe that it actually delegates
the search for classes
to the shell and the shell returns whatever it fiend's casted to it's
own class loader
> that I have not tried it) be able to use a custom classloader with a
> loadClass() override.
I tried this and it didn't work. I guess i am doing something wrong but
can't find appropriate
documentation. But i found this today
http://java.sun.com/docs/books/tutorial/jar/api/jarclassloader.html
I will study this and hope i get some good information from it.
> -- chris