/** * @deprecated Use {@link #classFileUrl(Class)} */ @Deprecated public static URL jarURL(Class<?> clazz) throws IOException { return classFileUrl(clazz); }
/** * @deprecated Use {@link #classFileUrl(Class)} */ @Deprecated public static URL jarURL(Class<?> clazz) throws IOException { return classFileUrl(clazz); }
/** * Locates the jar file that contains the given class. * <p> * <p> * Note that jar files are not always loaded from {@link File}, * so for diagnostics purposes {@link #jarURL(Class)} is preferrable. * * @throws IllegalArgumentException * if failed to determine. */ public static File jarFile(Class<?> clazz) throws IOException { return jarFile(classFileUrl(clazz), clazz.getName().replace('.', '/') + ".class"); }
/** * Locates the jar file that contains the given class. * <p> * <p> * Note that jar files are not always loaded from {@link File}, * so for diagnostics purposes {@link #jarURL(Class)} is preferrable. * * @throws IllegalArgumentException * if failed to determine. */ public static File jarFile(Class<?> clazz) throws IOException { return jarFile(classFileUrl(clazz), clazz.getName().replace('.', '/') + ".class"); }