This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to create a Tar file in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to create a Tar file in Java" Watch "How to create a Tar file in Java" New topic
Author

How to create a Tar file in Java

Satish Kulkarni
Ranch Hand

Joined: Jul 19, 2003
Posts: 60
Hi,
Does anybody have an idea of how to create to tar file in Java.

Thanks

-Satish
Srinivasa Raghavan
Ranch Hand

Joined: Sep 28, 2004
Posts: 1228
Originally posted by Satish Kulkarni:

Does anybody have an idea of how to create to tar file in Java.

Thanks

-Satish


Normally i user jar -cvf .... with a .tar extension


Thanks & regards, Srini
MCP, SCJP-1.4, NCFM (Financial Markets), Oracle 9i - SQL ( 1Z0-007 ), ITIL Certified
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608

Normally i user jar -cvf .... with a .tar extension


This is either a joke or a 'red herring' (false information) - I can't tell which.

You need to use a third party library.
Here is one that I have used before:
http://jakarta.apache.org/commons/sandbox/compress/apidocs/org/apache/commons/compress/tar/class-use/TarInputStream.html


Tony Morris
Java Q&A (FAQ, Trivia)
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

You may create an uncompressed archive (-0) without Manifest (-M) with

which will be similar to a tar-Archive, but not compatible; you may not extract it with (un)tar.
[ October 30, 2004: Message edited by: Stefan Wagner ]

http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to create a Tar file in Java
 
Similar Threads
java and tar
Not able to install Eclipse in UNIX
how to tar/untar a file using java?
TarOutputStream
Archiving files in UNIX