Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > Corrupt Zip File
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 4th November 03:51
alvin randolph
External User
 
Posts: 1
Default Corrupt Zip File



Hello:
I created a jar file made up of several class files from package
Importlib so I can import them to another package. Everytime I made a
change to one of the Importlib files. I created the jar file with

jar cvfm importest.jar manifest.txt importlib.*

This appeared to work, but after about 3 or 4 recreations I sometime
got a JBuilder6 error message

Cannot access class Outerclass; java.io.IOException: zip file is
corrupted ....

Sometimes I could run the jar command again and it would run fine. But
other times I would have to exit JBuilder, delete the jar file,
recreate a new one b4 it would work. What is causing this & how do I
fix it ??
--
Alvin Randolph
  Reply With Quote


 


2 4th November 03:52
paul nichols [teamb]
External User
 
Posts: 1
Default Corrupt Zip File



I have noticed that on Windows, when you overwrite a file, it either (1)
Does not overwrite or (2) becomes corrupted. So your problem may not be
a JB problem, but a Windows problem.

If you are doing this via a Unix/Linux OS, please tell us which one.
  Reply With Quote
3 4th November 03:52
alvin randolph
External User
 
Posts: 1
Default Corrupt Zip File


I am using Windows XP with JBuilder6.

I've also noticed that when I tried to run a jar file (java -cp
path -jar
.... ) after having recreating 3 or 4 times, it didn't run. When I did
a
table listing of the jar file (jar tf ...), the the class containing
the
main method had changed from what I gave in the manifest file.

Thanks for the assistance.

Alvin R.
  Reply With Quote
4 4th November 03:52
paul nichols [teamb]
External User
 
Posts: 1
Default Corrupt Zip File


Try deleting the current jar before you build a new one, or rename the
current jar file. See if that doesn't solve your problems.

I have had this happen several times on Windows, not just with jar files
either. Any compression algorithm seems to manifest this Windows bug.
  Reply With Quote
5 4th November 03:52
david orriss jr [teamb]
External User
 
Posts: 1
Default Corrupt Zip File


Running a virus scanner by any chance?

I've seen this happen when scanners on running.
--
David Orriss Jr. [TeamB]
http://www.codethought.com
* Please limit all responses to the newsgroups. Thanks! *

My blog: http://codethought.com/blog

Save yourself some time and check these sites:

Borland Newsgroup Search:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's Faq-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666