Added option to change the Java exec to the settings UI.

This commit is contained in:
Daniel Scalzi
2018-06-14 03:49:55 -04:00
parent 7cf0e1f049
commit 109c24bc79
7 changed files with 141 additions and 5 deletions

View File

@@ -767,7 +767,9 @@ class AssetGuard extends EventEmitter {
static _validateJavaBinary(binaryExecPath){
return new Promise((resolve, reject) => {
if(fs.existsSync(binaryExecPath)){
if(!AssetGuard.isJavaExecPath(binaryExecPath)){
resolve({valid: false})
} else if(fs.existsSync(binaryExecPath)){
child_process.exec('"' + binaryExecPath + '" -XshowSettings:properties', (err, stdout, stderr) => {
try {
// Output is stored in stderr?