public class ClasspathUrlFinder extends Object
| Constructor and Description |
|---|
ClasspathUrlFinder() |
| Modifier and Type | Method and Description |
|---|---|
static URL |
findClassBase(Class<?> clazz)
Find the classpath for the particular class
|
static URL[] |
findClassPaths()
Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH
|
static URL |
findResourceBase(String baseResource)
Find the classpath URL for a specific classpath resource.
|
static URL |
findResourceBase(String baseResource,
ClassLoader loader)
Find the classpath URL for a specific classpath resource.
|
static URL[] |
findResourceBases(String baseResource)
Find the classpath URLs for a specific classpath resource.
|
static URL[] |
findResourceBases(String baseResource,
ClassLoader loader)
Find the classpath URLs for a specific classpath resource.
|
static void |
loadFromConfigFiles(Properties propertyFile,
String configFileName)
Search on every classpath entry the informed config file and loads all of them into the given property file
|
public static URL[] findResourceBases(String baseResource, ClassLoader loader)
baseResource - public static URL[] findResourceBases(String baseResource)
baseResource - public static URL findResourceBase(String baseResource)
baseResource - public static URL findResourceBase(String baseResource, ClassLoader loader)
baseResource - loader - public static URL findClassBase(Class<?> clazz)
clazz - public static URL[] findClassPaths()
public static void loadFromConfigFiles(Properties propertyFile, String configFileName) throws Exception
propertyFile - the Properties File to be loadedconfigFileName - the name of the .properties fileExceptionCopyright © 2016. All rights reserved.