0 Replies Latest reply on Jul 30, 2014 5:05 AM by Praveen Jala

    getResource method in Jboss4 and Jboss5

    Praveen Jala Newbie

      I am getting the classloader of a sample class using the below:

      ClassLoader cl = Class.forName("com.abc.def.ClassA").getClassLoader();


      I am getting the URL of the above class using the below:

      URL url = cl.getResource("com/abc/def/ClassA.class");


      My question is


      URL returned in JBoss5 is



      URL returned in JBoss4.0.3 is

      jar:file:/C:/Program Files/jboss-4.0.3SP1/server/default/deploy/portal/cpcm-war.war/WEB-INF/lib/ca-cpcmr.jar!/com/fatwire/updateengine/UEBuildInfo.class


      Why there is difference in both the URL's, one starts with "vfszip" and the other starts with "jar"? I have written some logic to extract the location of the jar file based on the assumption that it starts with "jar", that part of code is not working in new JBoss5.


      Can anyone help me in solving this issue?