getClass (). GetResourceAsStream ("/.") Unable to get the correct resource
public class A {
public void test(){
InputStream in = this.getClass().getResourceAsStream("/lang/zh_cn.lang");
...
}
}
public class B extends A {
...
}
jarA.jar A/lang/zh_cn.lang
jarB.jar B/lang/zh_cn.lang
B.test() InputStream A jar