Classpath problem [message #449401] |
Thu, 11 May 2006 23:57  |
Eclipse User |
|
|
|
Hi all,
How can we give more priority to one jar over the other in the classpath.
for example:- if we have two jar A and B in class path. and both have a file of same name X. so what i want is that when i use that file X, the file X should be related to jar B.
Thanks in advance
|
|
|
Re: Classpath problem [message #449415 is a reply to message #449401] |
Fri, 12 May 2006 08:17  |
Eclipse User |
|
|
|
classpaths without eclispe are really simple. it will take the first
class X it finds.
So -classpath A.jar:B.jar will pick it up from A.jar, and -classpath
B.jar:A.jar will pick it up from B.jar. That's one of the convenient
ways to patch a java app, just put the patch jar earlier in the classpath.
In eclipse ... I'm not sure sure. If I had to guess, it's using the
dependency chain. if C depends on B depends on A, if C wants X and it
can be found in A, it'll be loaded from A.
Within one plugin, it's more like the normal way. If you have a
Bundle-ClassPath: A.jar, B.jar it'll take X from A.jar first.
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 0.06197 seconds