[PT-#151762870] boot-java launch support for VSCode
This commit is contained in:
@@ -21,7 +21,19 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
DEBUG: false,
|
||||
CONNECT_TO_LS: false,
|
||||
extensionId: 'vscode-boot-java',
|
||||
fatJarFile: 'jars/language-server.jar',
|
||||
launcher: (context: VSCode.ExtensionContext) => 'org.springframework.boot.loader.JarLauncher',
|
||||
classpath: (context: VSCode.ExtensionContext) => {
|
||||
const classpath = [
|
||||
Path.resolve(context.extensionPath, 'jars/language-server.jar')
|
||||
];
|
||||
const toolsJar = commons.findJvmFile('lib', 'tools.jar');
|
||||
if (toolsJar) {
|
||||
classpath.push(toolsJar);
|
||||
} else {
|
||||
VSCode.window.showWarningMessage('JAVA_HOME environment variable points either to JRE or JDK missing "lib/tools.jar" hence Boot Hints are unavailable');
|
||||
}
|
||||
return classpath;
|
||||
},
|
||||
clientOptions: {
|
||||
documentSelector: ['java'],
|
||||
synchronize: {
|
||||
|
||||
Reference in New Issue
Block a user