|
The name of the file containing the bytecode is not the same as the classname, but it has a suffix ".class". Furthermore, a classname as returned by Class.getName() returns the fully qualified name, including the package, with "." as the separation between the parts. That will probably not be a valid filename (I can think only of z/OS as an OS that uses the period as a separator char), since you're looking for that file on the filesystem. Replace the "." with the File.separator string and you should be set.
|