Changeset 4574
- Timestamp:
- 07/09/09 12:51:05 (7 months ago)
- Files:
-
- 1 modified
-
trunk/components/tools/OmeroPy/src/omero/java.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/components/tools/OmeroPy/src/omero/java.py
r4090 r4574 9 9 import platform 10 10 import subprocess 11 import exceptions 12 import logging 13 11 14 12 15 DEFAULT_DEBUG = "-Xrunjdwp:server=y,transport=dt_socket,address=8787,suspend=n" 16 17 def check_java(command): 18 try: 19 p = subprocess.Popen([command[0],"-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 20 std = p.communicate() 21 rc = p.wait() 22 if rc == 0: 23 return 24 except: 25 pass # Falls through to raise 26 27 raise exceptions.Exception("Java could not be found. (Executable=%s)" % command[0]) 13 28 14 29 def makeVar(key, env): … … 81 96 """ 82 97 command = cmd(args, java, xargs, chdir, debug, debug_string) 98 check_java(command) 83 99 if use_exec: 84 100 env = os.environ … … 108 124 """ 109 125 command = cmd(args, java, xargs, chdir, debug, debug_string) 126 check_java(command) 110 127 if not chdir: 111 128 chdir = os.getcwd()
