Imagine I have a file that contains the following import statement:
import a.b.c.D;
We can assume this class (a.b.c.D) has already been compiled. How can I find (programmatically) the location of the .class file on the disk, starting from the "a.b.c.D" string?
Consider that:
cina.b.c.Dmight be a class, despite this being highly unorthodox.Dmight be defined in fileE.java(Java allows the definition of multiple class per file, as long as only one is public)- the
.classfile might be in a.jaror.zipfile
Ideally, I don't want to write an algorithm to traverse directories and .jar as that seems to involve quite a bit of work.