title: How to run a JAR file on a different machine without updating the target machine's JRE
body: <p>I have created a runnable JAR file using Eclipse in one machine, say computer A. Computer A's Java version is,</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>java version "1.8.0_102" java(TM) SE Runtime Environment (build
  1.8.0_102-b14) Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode)
  </code></pre>
  
  <p>Now, I am trying to run this JAR file in another machine, say computer B, using the <code>java -jar</code> command in the command prompt. However, it gives the following error.</p>
  
  <pre class="lang-none prettyprint-override"><code>Exception in thread "main" java.lang.UnsupportedClassVersionError: bbg_upload/Task2_DailyValMktCap : Unsupported major.minor version 52.0
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClassCond(Unknown Source)
          at java.lang.ClassLoader.defineClass(Unknown Source)
          at java.security.SecureClassLoader.defineClass(Unknown Source)
          at java.net.URLClassLoader.defineClass(Unknown Source)
          at java.net.URLClassLoader.access$000(Unknown Source)
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
  </code></pre>
  
  <p>Computer B's Java version is lower than computer A's.</p>
  
  <pre class="lang-none prettyprint-override"><code>java version "1.6.0_26"
  Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
  Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode)
  </code></pre>
  
  <p>How can I run my JAR file in computer B without messing with any of the settings of computer B (i.e. without updating the JRE, etc.) because I am not allowed to modify anything in computer B since it is a common computer.</p>