public class MainHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
argFilePrefix |
static String |
argFileSuffix |
| Constructor and Description |
|---|
MainHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendUrltoClasspathCollection(ClassLoader cl,
Collection<String> classpath) |
static File |
createArgFile(List<String> args)
Creates a file containing all the arguments.
|
static String[] |
findFiles(File dir,
String pattern) |
static String[] |
findFiles(File dir,
String[] includes,
String[] excludes) |
static String |
locateJar(Class<?> c) |
static List<String> |
readArgFile(File argFile)
Creates a file containing all the arguments.
|
static void |
runMain(String mainClassName,
List<String> args,
ClassLoader cl)
Runs the main method of a java class
|
static String |
toClasspathString(ClassLoader cl) |
static String |
toMultiPath(List<String> paths) |
static String |
toMultiPath(String[] paths) |
public static final String argFilePrefix
public static final String argFileSuffix
public static String toClasspathString(ClassLoader cl) throws Exception
Exceptionpublic static void appendUrltoClasspathCollection(ClassLoader cl, Collection<String> classpath) throws Exception
Exceptionpublic static File createArgFile(List<String> args) throws IOException
IOExceptionpublic static List<String> readArgFile(File argFile) throws IOException
IOExceptionpublic static void runMain(String mainClassName, List<String> args, ClassLoader cl) throws Exception
ExceptionCopyright © 2012–2015. All rights reserved.