I hav written a simple code for finding out all the data fields of a class but i am getting an exceptio :"NoClassFoundException".....I am not understanding hoe to remove it...I would glad to receive any one's help....
import java.lang.reflect.*;
class SampleField
{ public static void getField(Class c)
{ //Class c= Class.forName(s);
Field f[]=c.getFields();
for(int i=0;i<f.length;i++)
{ System.out.println(" ");
Class type=f[i].getType();
System.out.print(type.getName());
System.out.print(""+f[i].getName());
}
}
public static void main(String... s1)
{ try{
Class c= Class.forName(s1[0]);
getField(c);
}catch(Exception e){System.out.println(e);}
}
}

