Results 1 to 5 of 5

Thread: How do you archive files of different formats in Java ?

  1. #1
    Join Date
    Dec 2010
    Posts
    66

    How do you archive files of different formats in Java ?

    Although this forum sounds as if it is a forum related to hardware and and the latest technologies, but later on I came to know about that you can type the software development queries as well , so my question is about the different types of files collected and used as a single file, is there any way to do so . I will request all the programmers who are aware of this type of query to comment on this , I am waiting for your response and I will be very grateful to those.

  2. #2
    Join Date
    May 2009
    Posts
    529

    Re: How do you archive files of different formats in Java ?

    Yes you can definitely do that , for that you can use the concept of Java Archive file .A Java Archive File, usually called as a Jar File is nothing but a compressed archive file. The file has two vital features :
    • This file is actually does not required to be compressed , but in case it is compressed there is an algorithm being is used to compress the file , this algorithm is called a Zip compression algorithm .
    • Once the file is created it has an extension as .jar file.
    • This .jar files supports multiple type of file extension .

  3. #3
    Join Date
    Apr 2009
    Posts
    569

    Re: How do you archive files of different formats in Java ?

    Archives are utilized to package a number of files and directories into one particular file, as such Java Archives or Jar Files are the same . Normally, Jar files are utilized to share out Java software, these Jar files include the specific class files of the programs saved in them.
    Some benefits of using Jar files are:
    • Safety, A jar file can be digitally signed allowing the users to confirm the signature and then provide the program safety rights .
    • Decrement in the time of download , since the archive is compressed it takes less time to download than it would to download each individual file.
    • Package Versioning, A Jar file may have seller and edition data about the files it holds .
    • Portability, all Java Runtime Environments or you can say JRE are aware how to manage Jar files.

  4. #4
    Join Date
    May 2009
    Posts
    539

    Re: How do you archive files of different formats in Java ?

    The Jar Tool comes in a package a kit called as Java Development Kit or in short JDK, so if your system has a JDK installed , there will be also a tool named as Jar tool. The Jar tool is executed through the command line, this implies you will make use of an MS Dos Prompt I if you have a Windows and a Shell or Console if you have a Linux or any other Unix like operating system . The command for executing the Jar tool is jar, you simply type the command in the shell or the command line.

  5. #5
    Join Date
    May 2009
    Posts
    527

    Re: How do you archive files of different formats in Java ?

    The essential command for creating a Jar file is:
    Code:
    jar cf jar-name of the file    input-files
    The c option shows that that you desire to create a jar and the f option shows that output must be sent to a file, then there is a the actual file that will be resulting Jar file that you want to create and input-files are the all the types of files you want to include in that particular jar file. But there was also something about a file a called manifest file being created, I had heard that this is actually the first file in any JAR file and through which the it is being recognized , but I am not actually sure about that so I am not commenting much in this manifest files .

Similar Threads

  1. how to convert MP4 files into Premier Friendly Formats?
    By Harigopal in forum Windows Software
    Replies: 3
    Last Post: 25-06-2011, 03:02 AM
  2. Nintendo 3DS shows no files inside zip archive
    By Calvert in forum Portable Devices
    Replies: 5
    Last Post: 02-04-2011, 11:00 AM
  3. Files could not be added because the formats not supported
    By Nims..Aisa in forum Windows Software
    Replies: 3
    Last Post: 29-07-2009, 08:35 AM
  4. How to extract files from rar archive in ubuntu?
    By Baker in forum Operating Systems
    Replies: 3
    Last Post: 10-03-2009, 10:32 AM
  5. Zip archive to build files in PHP
    By christheart in forum Software Development
    Replies: 1
    Last Post: 24-01-2009, 12:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,885,005.24072 seconds with 16 queries