Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By Norm

Thread: jar inside jar

  1. #1
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default jar inside jar

    I have an applet deployed by deployment toolkit.
    That applet is inside signed jar file, say x.jar.
    Inside that x.jar file there is another jar file, say jar.y.

    When I use deployment toolkit, how should I specify archive jar.y?

    I can do this by separating this two jar's, but than I have to sign two jar.'s.
    So, I want all in one jar, and just one signing.
    But, as I say, there is a problem while accessing jar.y inside jar.x.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: jar inside jar

    The JVM does not know about accessing jar files inside of jar files. All the jar files with class files and other resources must be separate files.
    diamonddragon likes this.

  3. #3
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default Re: jar inside jar

    Quote Originally Posted by Norm View Post
    The JVM does not know about accessing jar files inside of jar files. All the jar files with class files and other resources must be separate files.
    So, what solution is better?
    1. To put context of y.jar into x.jar, and sign x.jar, or
    2. Sign two jar files.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: jar inside jar

    Why are there two jar files? What is the source of the contents of each?
    How are they maintained? Will there be updates?

  5. #5
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default Re: jar inside jar

    Quote Originally Posted by Norm View Post
    Why are there two jar files? What is the source of the contents of each?
    How are they maintained? Will there be updates?
    y.jar is file that provide some drivers necessary for applet functionality.
    Say:

    x.jar:
    - packageX/AppletX.class
    - Meta-inf

    y.jar
    - A/B/C/driver.class
    - Meta-inf


    No updates on y.jar, but will be updates on x.jar.

    What do You mean by "how are they maintained"?
    Last edited by diamonddragon; 02-08-2012 at 01:34 AM.

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: jar inside jar

    By maintained I mean how are the contents created, gathered together and put into the jar.

    What was the reason for there being two jar files?

  7. #7
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default Re: jar inside jar

    Quote Originally Posted by Norm View Post
    By maintained I mean how are the contents created, gathered together and put into the jar.

    What was the reason for there being two jar files?
    The reason is that y.jar is provided by external source(company).
    y.jar have necessary database driver for AppletX.

    Contents are created manually, by putting y.jar in java project source directory.
    After compiling (NetBeans IDE), x.jar file is created so everything in project source directory is inside x.jar.

  8. #8
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,397
    Rep Power
    25

    Default Re: jar inside jar

    The reason is that y.jar is provided by external source(company).
    Then I'd not open it and change the location of its contents.

Similar Threads

  1. TCP sockets inside NAT/FW
    By SasukeJ in forum Networking
    Replies: 0
    Last Post: 12-19-2011, 12:37 PM
  2. Replies: 9
    Last Post: 04-12-2011, 07:26 PM
  3. Inside Java's API
    By davetheant in forum New To Java
    Replies: 11
    Last Post: 12-28-2010, 07:40 PM
  4. if statements inside of an if
    By thesthrncmfrt in forum New To Java
    Replies: 2
    Last Post: 10-27-2010, 01:18 PM
  5. Is it possible to run an exe inside a JFrame?
    By alacn in forum Advanced Java
    Replies: 15
    Last Post: 08-16-2010, 04:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •