PT #165978425: Exploded LS Jar for VSCode
This commit is contained in:
@@ -41,6 +41,8 @@ export interface JVM {
|
||||
* using spring-boot-maven-plugin ZIP layout.
|
||||
*/
|
||||
jarLaunch(jar: string, vmargs?: string[], execFileOptions?: ChildProcess.ExecFileOptions) : ChildProcess.ChildProcess
|
||||
|
||||
mainClassLaunch(mainClass: string, classpath: string[], jvmArgs: string[], execFileOptions?: ChildProcess.ExecFileOptions): ChildProcess.ChildProcess
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -216,6 +218,27 @@ class JVMImpl implements JVM {
|
||||
args.push("-jar", jar);
|
||||
return ChildProcess.execFile(this.getJavaExecutable(), args, execFileOptions);
|
||||
}
|
||||
|
||||
mainClassLaunch(mainClass: string, classpath: string[], jvmArgs: string[], execFileOptions?: ChildProcess.ExecFileOptions): ChildProcess.ChildProcess {
|
||||
const args: string[] = [];
|
||||
|
||||
// Classpath
|
||||
args.push('-cp');
|
||||
let classpathStr = classpath.join(Path.delimiter);
|
||||
const toolsJar = this.getToolsJar();
|
||||
if (toolsJar) {
|
||||
classpathStr += Path.delimiter + toolsJar;
|
||||
}
|
||||
args.push(classpathStr);
|
||||
|
||||
// JVM Arguments
|
||||
args.push(...jvmArgs);
|
||||
|
||||
// Main class
|
||||
args.push(mainClass);
|
||||
|
||||
return ChildProcess.execFile(this.getJavaExecutable(), args, execFileOptions);
|
||||
}
|
||||
}
|
||||
|
||||
function getJavaInfo(javaExe : string) : Promise<Map<string, string>> {
|
||||
|
||||
Reference in New Issue
Block a user