This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Problem in unzip using command jar –xf in java version "1.4.2" ,at AIX 5.0 platform  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I am facing a problem with unzip a zip file using jar command

Case:-if I use a zip file which contains folder and files inside
Example: 3 files and a folder and 3 files inside the folder

i am using command jar –xf in java version "1.4.2" ,at AIX 5.0 platform to unzip the zip files

Case1-when I create zip using PKZIP then jar command for unzip works fine

Case2-when I crate zip using koLibRI (Java 1.5 and Java 1.6, using the java.util.zip package) jar command do not unzip properly and files inside the folder are getting unzip outside it and no files are there inside the folder.


A "zipinfo -zhv" reveals the information below for both the zip files

--------------------------------------------------------------------------------
PKZIP-compressed ZIP:
--------------------------------------------------------------------------------
offset of local header from start of archive: 38 (00000026h) bytes
file system or operating system of origin: MS-DOS, OS/2 or NT FAT
version of encoding software: 2.0
minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
minimum software version required to extract: 2.0
compression method: deflated
compression sub-type (deflation): maximum
file security status: not encrypted
extended local header: no
file last modified on (DOS date/time): 2009 Dec 2 13:25:02
32-bit CRC value (hex): 092516ff
compressed size: 171043 bytes
uncompressed size: 1272316 bytes
length of filename: 34 characters
length of extra field: 0 bytes
length of file comment: 0 characters
disk number on which file begins: disk 1
apparent file type: binary
non-MSDOS external file attributes: 000000 hex
MS-DOS file attributes (20 hex): arc




--------------------------------------------------------------------------------
koLibRI-compressed ZIP:
--------------------------------------------------------------------------------
There are an extra 16 bytes preceding this file.



offset of local header from start of archive: 8552 (00002168h) bytes
file system or operating system of origin: MS-DOS, OS/2 or NT FAT
version of encoding software: 2.0
minimum file system compatibility required: MS-DOS, OS/2 or NT FAT
minimum software version required to extract: 2.0
compression method: deflated
compression sub-type (deflation): normal
file security status: not encrypted
extended local header: yes
file last modified on (DOS date/time): 2009 Dec 2 13:35:22
32-bit CRC value (hex): 092516ff
compressed size: 171043 bytes
uncompressed size: 1272316 bytes
length of filename: 34 characters
length of extra field: 0 bytes
length of file comment: 0 characters
disk number on which file begins: disk 1
apparent file type: binary
non-MSDOS external file attributes: 000000 hex
MS-DOS file attributes (00 hex): none


Comparing both of them shows the difference in following attributes
compression sub-type
extended local header:
MS-DOS file attributes (20 hex):

Please help me to get the reason and the solution as well.

Thanks in advance
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!