public class MainClassFinder extends Object
public static main method by performing a breadth first
search.| Constructor and Description |
|---|
MainClassFinder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
findSingleMainClass(JarFile jarFile,
String classesLocation,
String annotationName)
Find a single main class in a given jar file.
|
public static String findSingleMainClass(JarFile jarFile, String classesLocation, String annotationName) throws IOException
annotationName will be preferred over a main
class with no such annotation.jarFile - the jar file to searchclassesLocation - the location within the jar containing classesannotationName - the name of the annotation that may be present on the main
classnullIOException - if the jar file cannot be readCopyright © 2024. All rights reserved.