G
Gleb
I've got a strange situation.
I have third-party jar file which classes I am using in my app. The
used class has
URL url = Thread.currentThread().getContextClassLoader().getResource("config.xml");
in one of its method.
When I run my app application compilied in class-files everything is
allright, but when I put it in jar-file url becomes null. Jar-file
contains my classes and all third-party classes plus config.xml in the
root of jar-file. The most strange thing is that when I run
URL url = Thread.currentThread().getContextClassLoader().getResource("config.xml");
from the mthod of my class config.xml is available. So basically
config.xml is richable from my class but not from hird-party class
withing one jar-file. I've tried to put config.xml into different
directories withing jar-file without success.
Could be any particular detailes about this third-party class
implementation? Or any reason why ContextClassLoader behaves
differently in my class and third-party class? I really don't have any
ideas any more .
I have third-party jar file which classes I am using in my app. The
used class has
URL url = Thread.currentThread().getContextClassLoader().getResource("config.xml");
in one of its method.
When I run my app application compilied in class-files everything is
allright, but when I put it in jar-file url becomes null. Jar-file
contains my classes and all third-party classes plus config.xml in the
root of jar-file. The most strange thing is that when I run
URL url = Thread.currentThread().getContextClassLoader().getResource("config.xml");
from the mthod of my class config.xml is available. So basically
config.xml is richable from my class but not from hird-party class
withing one jar-file. I've tried to put config.xml into different
directories withing jar-file without success.
Could be any particular detailes about this third-party class
implementation? Or any reason why ContextClassLoader behaves
differently in my class and third-party class? I really don't have any
ideas any more .