title: Java's equivalent of Ruby's __FILE__?
body: <p>In Ruby I frequently use <code>File.dirname(__FILE__)</code> to open configuration files and such. For those that don't know Ruby, this will give the location on the file system of the file it's called from. This allows me to package libraries with data and config files and open those files with relative paths. </p>
  
  <p>What's the Java equivalent of this? If there is a data file I want to package with a jar how would I open the data file from Java code that is also in the jar?</p>