title: Enforcing Java minimum version to run with "java -version:<value>" doesn't work on Windows
body: <p>I want to enforce the minimum version of JVM my application should run on to 1.6 or greater (i.e. 1.6+).  My understanding is that you can do this using the "-version:" command line argument.  I tried it, and it seemed to work fine under Linux but not under Windows.</p>
  
  <p><strong>LINUX</strong></p>
  
  <p>I have a JDK version 1.6.0_21 installed on a Linux machine.  The $JAVA_HOME and $PATH environment variables have been set to what they should be.</p>
  
  <p>I ran the following:</p>
  
  <pre><code>$ java -version:1.6+ -version
  java version "1.6.0_21"
  Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
  Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
  
  $ java -version:1.5+ -version
  java version "1.6.0_21"
  Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
  Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
  
  $ java -version:1.7+ -version
  Unable to locate JRE meeting specification "1.7+"
  </code></pre>
  
  <p>All seemed to be expected.  "version:1.6+" and "version:1.5+" should work because I have a JDK 1.6.0_21 installed, and "version:1.7+" shouldn't because I don't have a JDK 1.7 installed.</p>
  
  <p><strong>WINDOWS</strong></p>
  
  <p>I have the same JDK version 1.6.0_21 installed on a Windows machine (Windows 7 to be more specific).  The %JAVA_HOME% and %PATH% environment variables have been set to what they should be.</p>
  
  <p>I ran the following:</p>
  
  <pre><code>$ java -version:1.6+ -version
  Unable to locate JRE meeting specification "1.6+"
  
  $ java -version:1.5+ -version
  Unable to locate JRE meeting specification "1.5+"
  
  $ java -version:1.7+ -version
  Unable to locate JRE meeting specification "1.7+"
  </code></pre>
  
  <p>I got an error for each execution.</p>
  
  <ul>
  <li><p>Can anyone explain why does the same command line argument work on Linux, but not on Windows?  Is this a feature or a bug?</p></li>
  <li><p>What can I do to fix/work around it?  As much as possible I want to have the same command line arguments applied on both Linux and Windows, so I don't have to specify a different "-version:" argument for Linux and another different one for Windows.</p></li>
  </ul>
  
  <p>Thanks.</p>