I tried to play around with this, after reading http://java.sun.com/developer/techni...ion/index.html
but I have a problem:
java.lang.ClassNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\eg\submissions\msk9\ClassTest.classCode:import java.lang.reflect.*; public class Test { public static void main(String args[]) { try { Class c = Class.forName("C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\eg\\submissions\\msk9\\ClassTest.class"); Method m[] = c.getDeclaredMethods(); for (int i = 0; i < m.length; i++) System.out.println(m[i].toString()); } catch (Throwable e) { System.err.println(e); } } }
but the .class file is definetely there..




Reply With Quote