Skip to content

Commit 0ed63c3

Browse files
committed
Don't set the -noverify flag if JDK >= 13
Signed-off-by: Fred Bricon <fbricon@gmail.com>
1 parent 5ee7b89 commit 0ed63c3

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
"string",
7474
"null"
7575
],
76-
"default": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
77-
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector",
76+
"default": "-Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
77+
"description": "Specifies extra VM arguments used to launch the Java Language Server. Eg. use `-Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector",
7878
"scope": "window"
7979
},
8080
"java.errors.incompleteClasspath.severity": {

src/javaServerStarter.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ function prepareParams(requirements: RequirementsData, javaConfiguration, worksp
9292
}
9393

9494
parseVMargs(params, vmargs);
95+
// "OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify
96+
// were deprecated in JDK 13 and will likely be removed in a future release."
97+
// so only add -noverify for older versions
98+
if (params.indexOf('-noverify') < 0 && params.indexOf('-Xverify:none') < 0 && requirements.java_version < 13) {
99+
params.push('-noverify');
100+
}
101+
95102
const serverHome: string = path.resolve(__dirname, '../server');
96103
const launchersFound: Array<string> = glob.sync('**/plugins/org.eclipse.equinox.launcher_*.jar', { cwd: serverHome });
97104
if (launchersFound.length) {

0 commit comments

Comments
 (0)