This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
HI all, I have to take some backup of some files from my application using java program. The final output should be in .tar format because this backed up data will be used in the application running in linux box and the linux box due to limited space does not have any other utilities like GZIP or unzip. Only the tar is supported. Hence i need to produce the back up data in tar format. Please advice me how to do it in windows environment ? Sample code will be really great help for me.
1. Call "tar" using one of the flavors of java.lang.Runtime.exec() . Note that this might not be portable. Joe Ess alluded how to get a "tar" that runs on windows 2. Find a tar library written in java and code against it. Here is something I found on Google search that alludes to such a library http://bugs.gentoo.org/show_bug.cgi?id=75343 3. Instear of tar, use jar for which java has built-in support. zip/unzip utilities are tiny in size in relation to the archives that you'll be making. This might be the path of least effort.
Which do you like best? [ November 26, 2008: Message edited by: Sev Zaslavsky ]