Merge branch 'master' into 4.0.x (JAVA_HOME on Ubuntu)

This commit is contained in:
Andrew Grieve
2014-09-29 10:16:33 -04:00
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -101,7 +101,8 @@ module.exports.check_java = function() {
});
} else {
// See if we can derive it from javac's location.
var maybeJavaHome = path.dirname(path.dirname(javacPath));
// fs.realpathSync is require on Ubuntu, which symplinks from /usr/bin -> JDK
var maybeJavaHome = path.dirname(path.dirname(fs.realpathSync(javacPath)));
if (fs.existsSync(path.join(maybeJavaHome, 'lib', 'tools.jar'))) {
process.env['JAVA_HOME'] = maybeJavaHome;
} else {