Skip to content

Commit

Permalink
first attempt to add Linux support: find JRE path
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 14, 2015
1 parent b2ec09d commit 67d2aa7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/geogig/gui/pyqtconnectordecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ def jrePath():
osName = "osx"
jre = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'bin', 'jre', osName)
else:
return
cmd = 'readlink -f $(which java)'
javaPath = subprocess.check_output(cmd, shell=True)
jre = os.path.dirname(os.path.dirname(javaPath))
if os.path.exists(jre):
_logger.debug('Found JRE ' + jre)
return jre

def geogigVersion():
Expand Down Expand Up @@ -184,7 +187,6 @@ def _startGateway():
else:
raise Exception("Gateway not available")


except Exception, e:
_logger.error("Could not start gateway (%s)" % (unicode(e)))
global _proc
Expand Down

0 comments on commit 67d2aa7

Please sign in to comment.