CVS check on ANT windows Build: Invalid CEN header (bad signature)

I have code in CVS, and when I check the code and create the ANT on my Windows box, I get the following errors.

Buildfile: C:\Java\JDeveloper\library\build.xml compile: [javac] Compiling 181 source files to C:\Java\JDeveloper\library [javac] error: error reading C:\Java\JDeveloper\library\lib\jdom.jar; invalid CEN header (bad signature) [javac] error: error reading C:\Java\JDeveloper\library\lib\tidy.jar; invalid CEN header (bad signature) [javac] error: error reading C:\Java\JDeveloper\library\lib\parser.jar; invalid CEN header (bad signature) [javac] error: error reading C:\Java\JDeveloper\library\lib\syslog.jar; invalid CEN header (bad signature) [javac] error: error reading C:\Java\JDeveloper\library\lib\regexp.jar; invalid CEN header (bad signature) [javac] 5 errors BUILD FAILED 

I checked it several times. This code will be checked and builds in my Linux box. I tried to test it using CVS from the command line using JDeveloper and Eclipse with the same result in a Windows XP window. I saw messages on the Internet stating that JARs are corrupted, but this seems strange, since the same JAR files will compile in the linux window. And I tried to remove and use the new JARs. From the command line, I used CVSNT with the same result. Thanks Tom

+4
source share
1 answer

One thing worth checking out is that banks were inadvertently added to CVS as non-binary files.

You can mark them as binary using

 cvs admin -kb <jar> cvs update -A <jar> 

On Windows systems, checking a non-binary file can result in converting a single-character line-endings to a two-character - which corrupts the true binary as a jar. You may not notice this when checking the same file on a unix / linux system, as when checking there is no special appeal to "text" files.

In addition, binary files can be damaged if they are installed on Windows as text files due to end-of-line conversion and keyword replacement.

+4
source

All Articles