Re: [Java-gnome-developer] Image handling URL
Brought to you by:
afcowie
From: pancake <pa...@ph...> - 2005-05-12 14:33:25
|
On Wed, 11 May 2005 21:38:46 -0300 (ART) Joao Victor <jvi...@ya...> wrote: > --- pancake <pa...@ph...> escreveu: > > I found a problem in JavaGnome API....it seems that it's impossible to handle files inside a > > JAR. > > > > The right way to do it is using > > > > URL xxx = this.getClass().getResource("icons/gdvb.png"); > > > > This returns an url like: jar:file://path/to/jar!path/to/file > > That's correct... but that isn't Java-Gnome's funcionality anymore, that's just java. But i didn't > understand very well what you want to do: > > You want a class inside a jar to load a file which is outside the jar? Is that right? Well, either > case, take a look at this page: Nope, I want to load a file inside the same jar that Gdvb class. The main problem is that I have to put the .jar in the CLASSPATH and execute the Gdvb class instead of java -jar gdvb.jar, because in this second form, java only handles the classpath defined in the MANIFEST. And I don't want to define the gtk jar file path there. Because is system-dependent. > http://www.javaworld.com/javaworld/javaqa/2002-11/02-qa-1122-resources.html > > Cheers, > J.V. > |