diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f71ae5d1..2c5e7cd1e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,6 @@ * enhancement - configure extra VM arguments in VS Code settings, used to launch the Java Language Server. See [#25](https://github.com/redhat-developer/vscode-java/issues/25). * enhancement - configure java.home property in VS Code settings. See [#28](https://github.com/redhat-developer/vscode-java/issues/28). * enhancement - improve Javadoc formatting on hover (scrollbar). See [#31](https://github.com/redhat-developer/vscode-java/issues/31). -* enhancement - support running the Java Language Server with Java 9. See [#43](https://github.com/redhat-developer/vscode-java/issues/43). * enhancement - add feedback when starting the Java Language Server. See [#49](https://github.com/redhat-developer/vscode-java/issues/49). * enhancement - add hover for package fragments. See [JLS#84](https://github.com/gorkem/java-language-server/pull/84). * bug fix - fix Java Language Server downloading when using a Proxy (take 2). See [#42](https://github.com/redhat-developer/vscode-java/issues/42). diff --git a/src/extension.ts b/src/extension.ts index 491fb2fb2e..4c9229dd37 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -44,7 +44,7 @@ function runJavaServer(){ params.push('-Dlog.protocol=true'); params.push('-Dlog.level=ALL'); } - + params.push('-jar'); params.push(path.resolve( __dirname ,'../../server/plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar')); //select configuration directory according to OS let configDir = 'config_win'; @@ -55,9 +55,6 @@ function runJavaServer(){ } params.push('-configuration'); params.push(path.resolve( __dirname ,'../../server',configDir)); params.push('-data'); params.push(workspacePath); - if (requirements.java_version > 8) { - params.push('--add-modules=java.se.ee'); - } let vmargs = workspace.getConfiguration("java").get("jdt.ls.vmargs",""); parseVMargs(params, vmargs); diff --git a/src/requirements.ts b/src/requirements.ts index 40b1c0b81d..519a94a77c 100644 --- a/src/requirements.ts +++ b/src/requirements.ts @@ -12,7 +12,6 @@ const findJavaHome = require('find-java-home'); interface RequirementsData { java_home: string - java_version: number } interface ErrorData { @@ -30,9 +29,9 @@ interface ErrorData { */ export async function resolveRequirements(): Promise { let java_home = await checkJavaRuntime(); - let javaVersion = await checkJavaVersion(java_home); + let isJava8 = await checkJavaVersion(java_home); let serverInstalled = await checkServerInstalled(); - return Promise.resolve({ "java_home": java_home, "java_version":javaVersion}); + return Promise.resolve({ "java_home": java_home }); } async function checkJavaRuntime(): Promise { @@ -79,12 +78,10 @@ async function checkJavaRuntime(): Promise { async function checkJavaVersion(java_home: string): Promise { return new Promise((resolve, reject) => { let result = cp.execFile(java_home + '/bin/java', ['-version'], {}, (error, stdout, stderr) => { - if (stderr.indexOf('1.8') < 0 && stderr.indexOf('9.') < 0) { - openJDKDownload(reject, "Java 8 minimum is required to run. Please download and install the latest JDK."); - } else { - let version = (stderr.indexOf('1.8') >= 0)?8:9; - resolve(version); - } + if (stderr.indexOf('1.8') < 0) + openJDKDownload(reject, "Java 8 is required to run. Please download and install a JDK 8."); + else + resolve(true); }); }); }