changeset 5103:276e14614531

Added jdkhome command to mx.
author Doug Simon <doug.simon@oracle.com>
date Tue, 20 Mar 2012 14:43:09 +0100
parents 09f638813477
children 9ec2917fd0de 37e75b4de85e
files mx/commands.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mx/commands.py	Mon Mar 19 13:33:49 2012 +0100
+++ b/mx/commands.py	Tue Mar 20 14:43:09 2012 +0100
@@ -384,6 +384,12 @@
         log.close()
     return ret
     
+def jdkhome(args, vm=None):
+    """prints the JDK directory selected for the 'vm' command"""
+    
+    build = _vmbuild if _vmSourcesAvailable else 'product'
+    print join(_graal_home, 'jdk' + mx.java().version, build)
+
 def build(args, vm=None):
     """build the VM binary
     
@@ -894,6 +900,7 @@
         'hsdis': [hsdis, '[att]'],
         'igv' : [igv, ''],
         'intro': [intro, ''],
+        'jdkhome': [jdkhome, ''],
         'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'],
         'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'],
         'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'],