diff --git a/packages/theia-integration/src/node/glsp-socket-server-contribution.ts b/packages/theia-integration/src/node/glsp-socket-server-contribution.ts index 9bf629e..7154f3b 100644 --- a/packages/theia-integration/src/node/glsp-socket-server-contribution.ts +++ b/packages/theia-integration/src/node/glsp-socket-server-contribution.ts @@ -117,7 +117,9 @@ export abstract class GLSPSocketServerContribution extends BaseGLSPServerContrib } protected launchJavaProcess(): Promise { - const args = ['-jar', this.options.executable!, '--port', `${this.options.socketConnectionOptions.port}`]; + const args = [...this.getJavaProcessJvmArgs(), + '-jar', this.options.executable!, + '--port', `${this.options.socketConnectionOptions.port}`]; if (this.options.socketConnectionOptions.host) { args.push('--host', `${this.options.socketConnectionOptions.host}`); @@ -129,6 +131,10 @@ export abstract class GLSPSocketServerContribution extends BaseGLSPServerContrib return this.spawnProcessAsync('java', args); } + protected getJavaProcessJvmArgs(): string[] { + return ['--add-opens', 'java.base/java.util=ALL-UNNAMED']; + } + protected startNodeProcess(): Promise { const args = [this.options.executable!, '--port', `${this.options.socketConnectionOptions.port}`];