1 Reply Latest reply on Sep 14, 2005 12:02 PM by Shigeru Chiba

    Loading class problem

    Marcin B Newbie

      Hello once again
      I have problem with class loading.
      Given code:

      1 ClassPool pool = ClassPool.getDefault();
       2 Loader cl = new Loader(pool); Class c = null;
       3 try {
       4 c = Class.forName(pClassName);
       5 } catch (ClassNotFoundException e1) {
       6 e1.printStackTrace();
       7 }
       8 CtClass cc;
       9 try {
       10 log.debug(" Getting class: " + pClassName);
       11 cc = pool.get(c.getName());

      throws me NotFoundException at line 11 and i can't understand why such thing happens. Why is class seen at 4th line and at 11 it can't be found?