title: How to get the location of the program you're running and store it in a File object
body: <p>I'm trying to find a way to reference my java program in order to check whether or not it's up-to-date, and I was wondering whether or not there is a special way of referring to it? For example, the person runs the program (I don't know where it is) and I want to compare it to a file I have on my web server to make sure it's up-to-date, but to do this I must have it stored in a File object in order to compare it to the one on my web server, how do I go about doing that? Is there a special way to find the location of the program that's being run?</p>
  
  <p>Something like this:</p>
  
  <pre><code>File thisProgram = new File(?);
  </code></pre>
  
  <p>Not sure what to put inside the parenthesis in order to reference the program itself.</p>