diff mx/commands.py @ 7779:18eea22675ad

mx build now requires a jdk version >= 1.7.0_04. Caused by http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7159016
author Christian Humer <christian.humer@gmail.com>
date Tue, 12 Feb 2013 15:59:46 +0100
parents 2d57a3bd82ab
children dbbe8ce3bfa5
line wrap: on
line diff
--- a/mx/commands.py	Tue Feb 12 14:33:24 2013 +0100
+++ b/mx/commands.py	Tue Feb 12 15:59:46 2013 +0100
@@ -1174,8 +1174,17 @@
     assert len(parts) >= 2
     assert parts[0] == '1'
     major = int(parts[1])
-    if not major >= 7:
-        mx.abort('Requires Java version 1.7 or greater, got version ' + version)
+    minor = 0
+    update = 0
+    if len(parts) >= 3:
+        minorParts = parts[2].split('_')
+        if len(minorParts) >= 1:
+            minor = int(minorParts[0])
+        if len(minorParts) >= 2:
+            update = int(minorParts[1])
+    
+    if (not major >= 7) or (major == 7 and minor == 0 and not update >= 4) :
+        mx.abort('Requires Java version 1.7.0_04 or greater, got version ' + version)
 
     if (_vmSourcesAvailable):
         if hasattr(opts, 'vm') and opts.vm is not None: