public class ClasspathShortener
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ARG_MAX_LINUX |
static int |
ARG_MAX_MACOS |
static int |
ARG_MAX_WINDOWS |
static int |
MAX_ARG_STRLEN_LINUX |
| Modifier | Constructor and Description |
|---|---|
|
ClasspathShortener(IVMInstall vmInstall,
ILaunch launch,
java.lang.String[] cmdLine,
int lastJavaArgumentIndex,
java.io.File workingDir,
java.lang.String[] envp) |
protected |
ClasspathShortener(java.lang.String os,
java.lang.String javaVersion,
ILaunch launch,
java.lang.String[] cmdLine,
int lastJavaArgumentIndex,
java.io.File workingDir,
java.lang.String[] envp) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addProcessTempFile(java.io.File file) |
java.lang.String[] |
getCmdLine()
Get the new command line.
|
java.lang.String[] |
getEnvp()
Get the new envp.
|
static java.lang.String |
getJavaVersion(IVMInstall vmInstall) |
protected java.lang.String |
getLaunchConfigurationName() |
protected boolean |
getLaunchConfigurationUseClasspathOnlyJarAttribute() |
protected java.lang.String |
getLaunchTimeStamp() |
protected int |
getMaxArgLength() |
protected int |
getMaxCommandLineLength() |
protected java.util.Map<java.lang.String,java.lang.String> |
getNativeEnvironment() |
protected char |
getPathSeparatorChar() |
java.util.List<java.io.File> |
getProcessTempFiles()
Necessary files that were created for starting the process.
|
java.io.File |
getProcessTempFilesDir() |
protected boolean |
handleClasspathTooLongStatus() |
java.lang.String |
quoteWindowsPath(java.lang.String path) |
void |
setProcessTempFilesDir(java.io.File processTempFilesDir)
The directory to use to create temp files needed when shortening the classpath.
|
boolean |
shortenCommandLineIfNecessary()
Shorten the command line if necessary.
|
public static final int ARG_MAX_LINUX
public static final int ARG_MAX_WINDOWS
public static final int ARG_MAX_MACOS
public static final int MAX_ARG_STRLEN_LINUX
public ClasspathShortener(IVMInstall vmInstall, ILaunch launch, java.lang.String[] cmdLine, int lastJavaArgumentIndex, java.io.File workingDir, java.lang.String[] envp)
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 ClasspathShortener(java.lang.String os,
java.lang.String javaVersion,
ILaunch launch,
java.lang.String[] cmdLine,
int lastJavaArgumentIndex,
java.io.File workingDir,
java.lang.String[] envp)
public void setProcessTempFilesDir(java.io.File processTempFilesDir)
processTempFilesDir - public java.io.File getProcessTempFilesDir()
public java.lang.String[] getEnvp()
public java.lang.String[] getCmdLine()
public java.util.List<java.io.File> getProcessTempFiles()
public boolean shortenCommandLineIfNecessary()
IJavaLaunchConfigurationConstants.ATTR_USE_CLASSPATH_ONLY_JAR is set, a classpath-only jar is used (without asking confirmation).getCmdLine() and
getEnvp() to get the new command line/environment.protected boolean getLaunchConfigurationUseClasspathOnlyJarAttribute()
throws CoreException
CoreExceptionpublic static java.lang.String getJavaVersion(IVMInstall vmInstall)
protected int getMaxCommandLineLength()
protected int getMaxArgLength()
protected void addProcessTempFile(java.io.File file)
protected boolean handleClasspathTooLongStatus()
throws CoreException
CoreExceptionprotected char getPathSeparatorChar()
protected java.lang.String getLaunchConfigurationName()
protected java.lang.String getLaunchTimeStamp()
protected java.util.Map<java.lang.String,java.lang.String> getNativeEnvironment()
public java.lang.String quoteWindowsPath(java.lang.String path)