Globals
Class GU

java.lang.Object
  extended by Globals.GU

public final class GU
extends java.lang.Object

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

resource

public static java.lang.String[] resource

resourceLength

public static int resourceLength
Constructor Detail

GU

public GU()
Method Detail

getResource

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?