Malformed .zip archive error for rt.jar using Ant
843810Apr 11 2005 — edited Apr 11 2005I'm moving a project over from windows to a linux box.
The project is built with ant. When I run it on the new box I get an error like this:
build.core:
[javac] Compiling 267 source files to /home/tony/work/organization/dist/classes
[javac] /home/tony/work/organization/src/com/somedotcom/util/PasswordCheck.java:0: error: malformed .zip archive in CLASSPATH: /usr/java/jdk1.5.0_02/jre/lib/rt.jar/
Followed by several class definitions not found from rt.jar.
There does not appear to be anything wrong with my jdk installation - I can compile selected selected java file from the command line using
javac path/to/myclass.java
There does not appear to anything wrong with rt.jar. I can jar -tvf to my heart's content and anyway I can compile using javac. I did in fact initially install from the rpm but to double check I downloaded the self-extracter and checked the file sizes of the two rt.jar files - they are identical at 39703314.
The only odd thing about the set up is that I did not install ant myself - it just magically appeared - I guess from the linux (Fedora Core 2) installation. I have an ant executable in /usr/bin/ant but no $ANT_HOME. So I guess the next step is to wipe out the current mysteriously present ant and do a fresh install.
The oddest thing is that I cannot find any reference to this problem here or via google. Maybe its something that people keep seeing and then immediately finding the answer to. If so, pray do tell.
Thanks in advance.