aspose file tools*
The moose likes Beginning Java and the fly likes Jar file not extracted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Jar file not extracted" Watch "Jar file not extracted" New topic
Author

Jar file not extracted

Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Hi, i downloaded xalan-2.7.1.jar file and i added that jar file in specific location. In that same location some other jar files are there and they used successfully in code.
But in the case of newly added jar file i am getting the error like "error in opening Zip" . i am getting error only for newly added jar file but remaining all are accessed in the code flow.
I changed the permissions of that file to 555, and after that i tried to compile. In this case also i am getting the same error.
I could not find the reason for that.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41574
    
  54
Well, *is* the file corrupt? Can you list its contents via "jar tf xalan-2.7.1.jar"? If not, download a fresh copy.


Ping & DNS - my free Android networking tools app
Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Ulf Dittmer wrote:Well, *is* the file corrupt? Can you list its contents via "jar tf xalan-2.7.1.jar"? If not, download a fresh copy.


Thanks, i extracted that jar file. i found some classed in that but i could not find the required class, And one more thing is at the end i saw error "java.io.EOFException:Unexpected end of ZLIB input stream
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
at java.uti.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.util.zip.ZipInputStream.read(ZipInputStream.java:146)
at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:92)
at sun.tools.jar.Main.list(Main.java:863)
at sun.tools.jar.Main.run(Main.java:212)
at sun.tools.jar.Main.main(Main.java:1022)
I think, we are getting error while extracting the jar file.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41574
    
  54
OK, so the file is corrupt - delete it and get a fresh copy. Make sure you don't treat it as ASCII anywhere - it's binary data.
Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Ulf Dittmer wrote:OK, so the file is corrupt - delete it and get a fresh copy. Make sure you don't treat it as ASCII anywhere - it's binary data.

Thanks, yes i downloaded a fresh copy and added in the required location. NOw it is working.
Thanks Ulf Dittmer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Jar file not extracted