title: Execute a JAR file in a specific JRE
body: <p>I have been looking at <a href="https://stackoverflow.com/questions/10757851/run-a-jar-file-using-a-specific-jre">this question</a> and although it shows how you can execute a <code>jar</code> in Windows, it does not show how this can be done in Linux (preferably <a href="http://en.wikipedia.org/wiki/CentOS" rel="nofollow noreferrer">CentOS</a>). How can I execute the <code>.jar</code> file I made in Linux?</p>
  
  <p>Here is what I have on the command line:</p>
  
  <pre><code>[support@turndownForWhat project]$ ls
  DICOMFLOW.jar  jre1.7.0_60
  </code></pre>
  
  <p>UPDATE: I have tried this:</p>
  
  <pre><code>[support@turndownForWhat project]$ sudo jre1.7.0_60/bin/java -jar DICOMFLOW.jar
  [sudo] password for support:
  sudo: jre1.7.0_60/bin/java: command not found
  </code></pre>
  
  <p>I ran:</p>
  
  <pre><code>[root@turndownForWhat project]# ls -l jre1.7.0_60/bin/java
  -rw-rw-r-- 1 support support 5718 Apr 17  2014 jre1.7.0_60/bin/java
  </code></pre>