public class JvmUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_FILE_SIZE |
Constructor and Description |
---|
JvmUtils() |
Modifier and Type | Method and Description |
---|---|
static Class |
classForShortName(String shortName)
Returns the first class in the classpath that has the specified short name.
|
static String |
getClassPath()
Returns a carefully constructed classpath matching the current process.
|
static List<File> |
getClassPathAsList() |
static String |
getFullClassName(String shortName)
Returns the first element in the classpath that has the specified short name.
|
static Process |
launch(Class klass,
String[] args)
Launches a new java program that uses the running configuration settings.
|
static Process |
launch(Class klass,
String[] args,
OutputStream out,
OutputStream err,
String heapSize)
Launches a new java program that uses the running configuration settings.
|
static void |
setWikiBrainClassPattern(Pattern pattern,
Pattern blacklist) |
public static final int MAX_FILE_SIZE
public static String getClassPath()
public static Process launch(Class klass, String[] args) throws IOException, InterruptedException
klass
- args
- IOException
InterruptedException
public static Process launch(Class klass, String[] args, OutputStream out, OutputStream err, String heapSize) throws IOException, InterruptedException
klass
- args
- out
- stdout stream for processerr
- stderr stream for processheapSize
- Maximum heap memory (e.g. 4M, 4G, etc) or null to use existing setting.IOException
InterruptedException
public static void setWikiBrainClassPattern(Pattern pattern, Pattern blacklist)
public static Class classForShortName(String shortName)
shortName
- public static String getFullClassName(String shortName)
shortName
- Copyright © 2018. All rights reserved.