Package hudson.remoting
Class Which
java.lang.Object
hudson.remoting.Which
Locates where a given class is loaded from.
- Author:
- Kohsuke Kawaguchi
-
Constructor Details
-
Which
public Which()
-
-
Method Details
-
classFileUrl
Returns the URL of the class file where the given class has been loaded from.- Parameters:
clazz
- Class- Returns:
- URL of the class file
- Throws:
IllegalArgumentException
- if failed to determine the URL.IOException
- Since:
- 2.24
-
jarURL
Deprecated.- Throws:
IOException
-
jarFile
Locates the jar file that contains the given class.Note that jar files are not always loaded from
File
, so for diagnostics purposesjarURL(Class)
is preferrable.- Parameters:
clazz
- Class- Returns:
- JAR File, which contains the class.
- Throws:
IllegalArgumentException
- if failed to determine the class File URL.IOException
-
jarFile
- Throws:
IOException
-
classFileUrl(Class)