|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.taverna.raven.prelauncher.ClassLocation
public class ClassLocation
Given a Class, find the directory/JAR it was loaded from. This can
be used to find the bootstrap directory the application was installed to.
| Constructor Summary | |
|---|---|
ClassLocation()
|
|
| Method Summary | |
|---|---|
static java.io.File |
getClassLocationDir(java.lang.Class<?> theClass)
Get the canonical directory of the class file or jar file that the given class was loaded from. |
static java.io.File |
getClassLocationFile(java.lang.Class<?> theClass)
Get the canonical directory or jar file that the given class was loaded from. |
static java.net.URI |
getClassLocationURI(java.lang.Class<?> theClass)
Get the URI from where the given class was loaded from. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassLocation()
| Method Detail |
|---|
public static java.io.File getClassLocationDir(java.lang.Class<?> theClass)
throws java.io.IOException
theClass - The class which location is to be found
java.io.IOException - if the canonical directory or jar file cannot be foundgetClassLocationFile(Class)
public static java.io.File getClassLocationFile(java.lang.Class<?> theClass)
throws java.io.IOException
getClassLocationDir(Class) if you want the directory that
contains the JAR.
java.io.IOException - if the canonical directory or jar file cannot be found, or
the class was not loaded from a file:/// URI.getClassLocationURI(Class)
public static java.net.URI getClassLocationURI(java.lang.Class<?> theClass)
throws java.io.IOException
getClassLocationFile(Class)
or getClassLocationDir(Class).
java.io.IOException - if the canonical directory or jar file cannot be found, or
the class was not loaded from a file:/// URI.getClassLocationURI(Class)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||