On Mon, 18 Oct 1999, Robert Simmons wrote:
> I have an application that I intend to package as a jar, with its images in
> the Jar. How do I construct a URL object to load those images into IconImage
> instances from the LOCAL jar file (ie, the file the program is running in.)
> Further, is there a generic way I can have it load from either the
> subdirectory, if the app is not run from a jar, such as when Im doing
> interim builds during programs, and from the jar in a distribution.
Class.getResource(), Class.getResourceAsStream() will do what you want, if
your images are in the same JAR or directory as your class files.
. . . Sean.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]