0 Replies Latest reply on Sep 20, 2005 7:54 PM by Yonas Jongkind

    Difficulties running javassist from an ant-task

    Yonas Jongkind Newbie


      I am using javassist from within an ant task. I had quite a bit of difficulty.

      I posted this as a bug to ant, but they are having difficulty grocking the issue, as am I.


      The bug is best illustraighted by the following code snippet (from execute
      within my ant task):

      System.out.println("CL1: "+Thread.currentThread().getContextClassLoader());
      System.out.println("CL2: "+this.getClass().getClassLoader());

      The output is:

      CL1: java.net.URLClassLoader@82ba41
      CL2: org.apache.tools.ant.loader.AntClassLoader2@1c1ea29

      The workaround for my code is:


      Which causes Javassist to work perfectly.