Sorry, hit some shortcut, so:
Class c = this.getClass();
URL u1 = c.getResource("../");
URL u2 = c.getResource("../../");
URL u3 = c.getResource("../../../");
URL u4 = c.getResource("../../../../");
Gives sometimes like:
u1 = vfs:/content/test.war/WEB-INF/classes/org/jboss/as/test/pk1/
u2 = vfs:/content/jtest.war/WEB-INF/classes/org/jboss/as/test/
u3 =
jar:file:/home/baranowb/git/jboss-as/build/target/jboss-as-7.1.1.Final-SNAPSHOT/modules/org/jboss/as/ejb3/main/jboss-as-ejb3-
u4 =
jar:file:/home/baranowb/git/jboss-as/build/target/jboss-as-7.1.1.Final-SNAPSHOT/modules/org/jboss/ejb-client/main/jboss-ejb-client-1.0.3.Final.jar!/org/jboss/
Seems a bit wrong, doesnt it ?
----- Original Message -----
From: "Bartosz Baranowski" <bbaranow(a)redhat.com>
To: jboss-as7-dev(a)lists.jboss.org
Sent: Thursday, March 8, 2012 10:31:03 AM
Subject: [jboss-as7-dev] Class.getResource returns wrong URL ?
Hi
Ive found something weird in AS7 resource lookup - to be precise, below code executed in
AS7 gives output like:
Class c = this.getClass();
URL u1 = c.getResource("../");
URL u2 = c.getResource("../../");
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev