title: Change directory and execute file in one command
body: <p>When I want to execute a file, it seems that I always have to first 'cd' into that file's directory before executing it, unless it fails on a can't-find-my-dataz type error. </p>
  
  <p>How can I get around typing two commands to just execute a program?</p>
  
  <p>Example: </p>
  
  <pre><code>cd /usr/local/bin/minecraft/
  java -Xms512M -Xmx2048M -jar minecraft.jar
  </code></pre>
  
  <p>How can I make that into one line, so as I can put it as my Exec=<em>_</em> line when creating a custom launcher in Gnome3?</p>