ClassLoader problems

I'm trying to dynmically load some junit classes and I'm having a serious problem. Loaded classes have null values. Meaning the Class is found and created, and is not itself null, but all of it's members are null (such as method names). Currently, I'm using the TestCaseClassLoader from junit, but I've also tried getting the class loader from class.getClassLoader off of one of the testCases. Any suggestions would be appreciated, and appologies if this is the wrong thread for the post.

//gets the name of the file

fileName = file.toString();

TestCaseClassLoader classLoader = new TestCaseClassLoader();

Class classFile = null;

//try to load the class

try

{

String fullPath = relativePath + "." + fileName;

classFile = classLoader.loadClass(fullPath, true);

}

catch (Exception e) {

e.printStackTrace();

System.out.println("Could not load the file " + fileName);

}

return classFile;

[989 byte] By [duomaxa] at [2007-11-27 6:21:54]
# 1
the String fullPath, r u pointing this object to a file path (e.g. C:\blah\blah)? or a class path (e.g. com.java.samplePackage.sampleClass)? make sure u're loading class instead of a file. if u want to read a file into java, u can use InputStream instead.hope this help
JWKC-5ivea at 2007-7-12 17:38:42 > top of Java-index,Core,Core APIs...
# 2

Your classloader looks bad. It does not have a parent classloader. I am not sure if the classes can be found. I would expect an exception to be thrown.

I dont know what you mean by method names being null since method names are not class members. Can you explain the problem with an example?

_dnoyeBa at 2007-7-12 17:38:42 > top of Java-index,Core,Core APIs...