Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const JAVA_RESOLVE_BUILD_FILES = "vscode.java.resolveBuildFiles";

export const JAVA_IS_ON_CLASSPATH = "vscode.java.isOnClasspath";

export const JAVA_RESOLVE_JAVAEXECUTABLE = "vscode.java.resolveJavaExecutable";

export function executeJavaLanguageServerCommand(...rest) {
// TODO: need to handle error and trace telemetry
if (!utility.isJavaExtEnabled()) {
Expand Down
1 change: 1 addition & 0 deletions src/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
});
}

config.javaExec = await lsPlugin.resolveJavaExecutable(config.mainClass, config.projectName);
// Add the default launch options to the config.
config.cwd = config.cwd || _.get(folder, "uri.fsPath");
} else if (config.request === "attach") {
Expand Down
4 changes: 4 additions & 0 deletions src/languageServerPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ export async function isOnClasspath(uri: string): Promise<boolean> {
return true;
}
}

export function resolveJavaExecutable(mainClass, projectName) {
return commands.executeJavaLanguageServerCommand(commands.JAVA_RESOLVE_JAVAEXECUTABLE, mainClass, projectName);
}