title: Registry Key '...' has value '1.7', but '1.6' is required. Java 1.7 is Installed and the Registry is Pointing to it
body: <p>My development team recently was forced over to a remote development environment where we do not have full access to the servers.  Before the change over we had a JAR that was running fine on Java 1.7 x64 along with JRE 7.  When we moved over to the new server our JAR was running alright, but then one of the server admins "updated" our Java to an older version and uninstalled the one we were using.  Don't ask me why, I don't know.  I re-installed Java 1.7 and uninstalled 1.6 along with the JREs.</p>
  
  <p>The following problem occurs at runtime, there are no build errors:</p>
  
  <pre><code>Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
  has value '1.7', but '1.6' is required.
  Error: could not find java.dll
  Error: could not find Java SE Runtime Environment.
  </code></pre>
  
  <p>I've run the same JAR on my laptop with no issues.  Both the server and my laptop have JDK 1.7 and JRE 7 in the respective %HOME% variables and system PATH.  I've even reinstalled JRE 6 and placed it later in the system environment PATH variables with the same result.</p>
  
  <p>I have also changed the registry back to look at 1.6 and it results in the following, which I looked up and it appears to be from having multiple Javas installed (leading back to my original problem):</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsupportedClassVersionError: ... :
  Unsupported major.minor version 51.0
  </code></pre>
  
  <p>I would appreciate any insight you all have as I have been looking over various forums but nothing seems to have exactly my problem.  Also, this has happen on another server we are using as well.  Thanks!</p>
  
  <p>Update: No luck with recompiling the JAR to either 1.6 or 1.7 and matching the JDK.  Also, why in the world would a newer version of Java break an older compiled version?</p>