|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectGlobals.GU
public final class GU
Global Utility Class
| Field Summary | |
|---|---|
static java.lang.String[] |
resource
|
static int |
resourceLength
|
| Constructor Summary | |
|---|---|
GU()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getResource(java.net.URL codebase,
java.lang.String FileName,
int typeOfResource,
java.lang.Object ob)
This method try to use jar to retrieve the resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String[] resource
public static int resourceLength
| Constructor Detail |
|---|
public GU()
| Method Detail |
|---|
public static java.lang.String getResource(java.net.URL codebase,
java.lang.String FileName,
int typeOfResource,
java.lang.Object ob)
This method try to use jar to retrieve the resource.
If this approach fails, then resource is read from normal
tree in the root of index.htm web page.
jar is something I cannot rely on yet:
I would not be able to find quick and clear docs.
Some say this:
ob.getClass().getResource(relativePath);
Some say this:
ob.getClass().getClassLoader().getResource(relativePath);
I found that when I prepend "/" to the relative path,
the method begins working.
This "../Resources/" + FileName
and this "Resources/" + FileName
were not successfull.
But, I cannot rely in try and see method ...
This is why this proc., getResource, is so clumsy and have
so redundant checkers ...
do1b do Container ob ? to speed up the cast?
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||