diff --git a/x-pack/plugins/code/server/lsp/java_launcher.ts b/x-pack/plugins/code/server/lsp/java_launcher.ts index eac5dbf446e78f..0846f03e50d452 100644 --- a/x-pack/plugins/code/server/lsp/java_launcher.ts +++ b/x-pack/plugins/code/server/lsp/java_launcher.ts @@ -93,7 +93,6 @@ export class JavaLauncher implements ILanguageServerLauncher { return path.resolve(installationPath, JDKFound[0]); } - let config = 'config_mac'; let bundledJavaHome = `${findJDK('osx')}/Contents/Home`; let javaPath = 'java'; let javaHomePath = ''; @@ -103,11 +102,9 @@ export class JavaLauncher implements ILanguageServerLauncher { break; case 'win32': bundledJavaHome = `${findJDK('windows')}`; - config = 'config_win'; break; case 'linux': bundledJavaHome = `${findJDK('linux')}`; - config = 'config_linux'; break; default: log.error('Unable to find platform for this os'); @@ -140,7 +137,7 @@ export class JavaLauncher implements ILanguageServerLauncher { '-jar', path.resolve(installationPath, launchersFound[0]), '-configuration', - path.resolve(installationPath, './repository', config), + this.options.jdtConfigPath, '-data', this.options.jdtWorkspacePath, ], diff --git a/x-pack/plugins/code/server/server_options.ts b/x-pack/plugins/code/server/server_options.ts index bc6fb7b117f5b5..0a59a1060781e5 100644 --- a/x-pack/plugins/code/server/server_options.ts +++ b/x-pack/plugins/code/server/server_options.ts @@ -16,6 +16,8 @@ export class ServerOptions { public readonly jdtWorkspacePath = resolve(this.config.get('path.data'), 'code/jdt_ws'); + public readonly jdtConfigPath = resolve(this.config.get('path.data'), 'code/jdt_config'); + public readonly updateFrequencyMs: number = this.options.updateFreqencyMs; public readonly indexFrequencyMs: number = this.options.indexFrequencyMs;