View Single Post
  #2 (permalink)  
Old 08-03-2007, 07:21 PM
Heather Heather is offline
Senior Member
 
Join Date: Jun 2007
Posts: 164
Heather is on a distinguished road
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.
Reply With Quote