• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a Tar file in Java  RSS feed

 
Satish Kulkarni
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anybody have an idea of how to create to tar file in Java.

Thanks

-Satish
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!