hudson.remoting
Class Which
java.lang.Object
hudson.remoting.Which
public class Which
- extends Object
Locates where a given class is loaded from.
- Author:
- Kohsuke Kawaguchi
|
Constructor Summary |
Which()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Which
public Which()
jarURL
public static URL jarURL(Class clazz)
throws IOException
- Locates the jar file that contains the given class.
- Throws:
IllegalArgumentException - if failed to determine.
IOException
jarFile
public static File jarFile(Class clazz)
throws IOException
- Locates the jar file that contains the given class.
Note that jar files are not always loaded from File,
so for diagnostics purposes jarURL(Class) is preferrable.
- Throws:
IllegalArgumentException - if failed to determine.
IOException
jarFile
public static File jarFile(URL resource)
throws IOException
- Throws:
IOException
Copyright © 2004-2011. All Rights Reserved.