Re: JAR in a JAR?



On Aug 29, 3:13 pm, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
Jason Cavett wrote:
On Aug 29, 2:17 pm, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
Jason Cavett wrote:
On Aug 28, 6:09 pm, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
Jason Cavett wrote:
On Aug 28, 11:52 am, RedGrittyBrick <RedGrittyBr...@xxxxxxxxxxxxxxxxx>
In MyApp's Jar's manifest specify the class-path for the other Jar files.
I tried that, but it didn't seem to work.
I actually need to clarify the issue - the real problem seems to be
that I have resources (icons in this case) that I'm trying to access
in OtherDevExternalLibrary, but I'm running MyApp.  So, when I go to
look for the icons, they aren't there (even though they are).
Something like this...
MyApp
 - resources
  - icons (contains specific icons to MyApp)
 - OtherDevExternalLibrary
  - resources
   - icons (contains icons for the external library)*
* I can't seem to see the icons located in this directory.
Do you have any suggestion for this problem?
You do have OtherDevExternalLibrary.jar as an external file
outside MyApp.jar ??
Here's what I've figured out since yesterday.
1. OtherDevExternalLibrary.jar should be packaged in MyApp.jar.
2. I have the MANIFEST file in MyApp referring to
OtherDevExternalLibrary.jar
The only problem is, the MANIFEST file refers to
OtherDevExternalLibrary.jar as...
lib/OtherDevExternalLibrary.jar
No.

The manifest should refer to OtherDevExternalLibrary.jar, but
OtherDevExternalLibrary.jar should be a separate file in same
dir as MyApp.jar !

Really?  There's no way to create a self-contained JAR?

Wow.  That's...kind of crummy, actually.

Can you create a .dll/.so with another .dll/.so inside it ?

Jar files is intended to be replaceable units.

If you need a single deployment unit, then you need to stuff
all classes in one jar - just like you need to stuff all
object files in one exe to achieve the same for native code.

(if you really want to work around it then you can with a
custom classloader that will load code from jars inside jars - I
think someone already have posted a link to such a beast)

Arne

I guess that makes sense when put that way. Alright. Thanks for your
information. Appreciate it.
.



Relevant Pages

  • Re: JAR in a JAR?
    ... that I have resources that I'm trying to access ... in OtherDevExternalLibrary, but I'm running MyApp. ... look for the icons, they aren't there. ... I have the MANIFEST file in MyApp referring to ...
    (comp.lang.java.programmer)
  • Re: Finding resources in JAR file
    ... > (images, icons, etc.) which can be found inside the same JAR file. ... Which means that if this class is com.image.ppp.Test it should be in jar here com/image/ppp/icon/abc.gif. ... Also be careful which class you use to take resources of. ...
    (comp.lang.java.programmer)
  • Re: JAR in a JAR?
    ... that I have resources that I'm trying to access ... in OtherDevExternalLibrary, but I'm running MyApp. ... look for the icons, they aren't there. ... I have the MANIFEST file in MyApp referring to ...
    (comp.lang.java.programmer)
  • Re: JAR in a JAR?
    ... the jar - you can not modify them from your app. ... The library in question has resources inside a resource folder... ... So, when I run myapp, the library looks for its resources in myapp's ... resources folder or put the library's resources inside ...
    (comp.lang.java.programmer)
  • Re: Displaying Images
    ... called resources, but as far as I can tell, the only way these images get ... I don't mind if I have to add these images to the JAR after I've compiled, ... Put the image file in a directory called images. ... Change the name of the images directory when you test just to make sure. ...
    (comp.lang.java.gui)

Loading