Results 1 to 4 of 4
  1. #1
    Zarah is offline Senior Member
    Join Date
    Mar 2014
    Posts
    286
    Rep Power
    7

    Default Addition of directories to a JAR archive

    From here,

    The basic format of the command for creating a JAR file is:

    Java Code:
    jar cf jar-file input-file(s)
    The options and arguments used in this command are:

    ...
    The input-file(s) argument is a space-separated list of one or more files that you want to include in your JAR file...If any of the "input-files" are directories, the contents of those directories are added to the JAR archive recursively.
    What is meant by recursive addition to files to a JAR archive?

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: Addition of directories to a JAR archive

    I believe it just means that it walks the directory tree (or hierarchy) and includes the appropriate files.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    29

    Default Re: Addition of directories to a JAR archive

    Quote Originally Posted by Zarah View Post
    What is meant by recursive addition to files to a JAR archive?
    If you add a directory and that directory contains other (sub) directories, they are added to the .jar file too.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  4. #4
    Zarah is offline Senior Member
    Join Date
    Mar 2014
    Posts
    286
    Rep Power
    7

    Default Re: Addition of directories to a JAR archive

    @Jim829 @JosAH Thank you very much.

Similar Threads

  1. Partial copy of zip archive
    By nmn in forum New To Java
    Replies: 3
    Last Post: 02-05-2013, 08:24 PM
  2. Help with Directories
    By XDrew574X in forum New To Java
    Replies: 0
    Last Post: 03-27-2011, 01:09 AM
  3. Directories
    By KevMeistr in forum New To Java
    Replies: 6
    Last Post: 06-11-2008, 05:03 PM
  4. Zip Archive Problem
    By satishbejgum in forum Advanced Java
    Replies: 1
    Last Post: 12-20-2007, 10:08 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
  •