Enforcing Java minimum version to run with “java -version:<value>” doesn't work on Windows
问题 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. LINUX 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. I ran the following: $ java -version:1.6+ -version java version "1.6.0_21" Java