Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a Tar file in Java  RSS feed

 
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
 
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
 
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
 
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 ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!