In code, turn the fully qualified class name into a file path, then use getResource() from the ClassLoader and print out the URL it returns. If you keep it as a URL, it will even show the location in JARs. eg to find com.javaranch.davo.MyClass
That may need debugging, I wrote it off the top of my head.
Joined: Dec 10, 2001
If you're just trying to figure out the working directory of some Java application, then the "user.dir" System property might do the trick.