Configure Java Home
This commit is contained in:
		@@ -2,6 +2,7 @@ import * as vscode from 'vscode';
 | 
			
		||||
import { ConnectionNode } from './connections'
 | 
			
		||||
import { spawn } from 'child_process'
 | 
			
		||||
import { TextDocumentContentProvider } from './resultsetview'
 | 
			
		||||
import * as path from 'path'
 | 
			
		||||
 | 
			
		||||
const extensionName = "frog";
 | 
			
		||||
const previewUri = vscode.Uri.parse('frog-view://authority/resultset');
 | 
			
		||||
@@ -59,7 +60,12 @@ export class SessionManager {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        let extPath = vscode.extensions.getExtension("todie.frog").extensionPath;
 | 
			
		||||
        this.dbSession = spawn("java", ['-jar', extPath + '/frog-runner.jar', this.currentConnection.host, this.currentConnection.port.toString(), this.currentConnection.schema, this.currentConnection.username, this.currentConnection.password]);
 | 
			
		||||
        let javaHome = vscode.workspace.getConfiguration('frog').get("frog.javaHome", "")
 | 
			
		||||
        let java = "java";
 | 
			
		||||
        if (javaHome) {
 | 
			
		||||
            java = path.join(javaHome, 'bin', 'java')
 | 
			
		||||
        }
 | 
			
		||||
        this.dbSession = spawn(java, ['-jar', extPath + '/frog-runner.jar', this.currentConnection.host, this.currentConnection.port.toString(), this.currentConnection.schema, this.currentConnection.username, this.currentConnection.password]);
 | 
			
		||||
 | 
			
		||||
        let outputBuffer = "";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user