public class CommandLineShortener
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
|
CommandLineShortener(IVMInstall vmInstall,
ILaunch launch,
java.lang.String[] cmdLine,
java.io.File workingDir) |
protected |
CommandLineShortener(java.lang.String javaVersion,
ILaunch launch,
java.lang.String[] cmdLine,
java.io.File workingDir) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProcessTempFile(java.io.File file) |
protected java.io.File |
createArgumentFile(java.lang.String[] cmdLine) |
static java.lang.String |
getJavaVersion(IVMInstall vmInstall) |
protected java.lang.String |
getLaunchConfigurationName() |
protected java.lang.String |
getLaunchTimeStamp() |
java.lang.String[] |
getOriginalCmdLine() |
java.util.List<java.io.File> |
getProcessTempFiles()
Necessary files that were created for starting the process.
|
java.io.File |
getProcessTempFilesDir() |
protected boolean |
isArgumentFileSupported() |
void |
setProcessTempFilesDir(java.io.File processTempFilesDir)
The directory to use to create temp files needed when shortening the classpath.
|
java.lang.String[] |
shortenCommandLine()
Writes the command line into an arguments file and returns the shortened command line.
|
boolean |
shouldShortenCommandLine()
Indicates if the command line
can and should be shortened. |
public CommandLineShortener(IVMInstall vmInstall, ILaunch launch, java.lang.String[] cmdLine, java.io.File workingDir)
vmInstall - the vm installationlaunch - the launchcmdLine - the command line (java executable + VM arguments + program arguments)lastJavaArgumentIndex - the index of the last java argument in cmdLine (next arguments if any are program arguments)workingDir - the working dir to use for the launched VM or nullenvp - array of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should
inherit the environment of the current process.protected CommandLineShortener(java.lang.String javaVersion,
ILaunch launch,
java.lang.String[] cmdLine,
java.io.File workingDir)
public static java.lang.String getJavaVersion(IVMInstall vmInstall)
protected void addProcessTempFile(java.io.File file)
protected java.io.File createArgumentFile(java.lang.String[] cmdLine)
throws CoreException
CoreExceptionprotected java.lang.String getLaunchConfigurationName()
protected java.lang.String getLaunchTimeStamp()
public java.util.List<java.io.File> getProcessTempFiles()
public java.io.File getProcessTempFilesDir()
public java.lang.String[] getOriginalCmdLine()
protected boolean isArgumentFileSupported()
true if the JVM supports launching with argument files, false otherwisepublic void setProcessTempFilesDir(java.io.File processTempFilesDir)
processTempFilesDir - public java.lang.String[] shortenCommandLine()
throws CoreException
CoreExceptionpublic boolean shouldShortenCommandLine()
throws CoreException
can and should be shortened.
The command line should only be shortened if at least Java 9 is used and the launch is configured to do so.
true if isArgumentFileSupported() returns true and command line should be shortened,
false otherwiseCoreException