image

Finding the Directory Where Your Java .class File is Loaded From

June 11, 2008
Today I had to solve an unusual problem: I needed to find the directory that was used to load a specific Java .class file (the location in the file system of given .class file). I needed it because I wanted to load resources located somewhere in the classPath with file access API (not with accessable