ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Feskanich <Maurice.Feskan...@Sun.COM>
Subject Re: ZipException on javac task moving from jdk1.4 to jdk1.5
Date Tue, 07 Jun 2005 18:10:44 GMT
Don't know if this will help, but I've seen some strange exceptions
moving from jdk 1.4.x to 1.5.x if the JAVA_HOME env var doesn't point to
the same jdk version as the compiler used by the javac task.  Make sure
things are in sync.  If nothing else, it will rule this out as the cause.

Maury


Fabricio M. Sanchez wrote:
> Hi there,
> 
> I've searched google, ant-faq and ant-manual and found nothing conclusive...
> 
> I have recently moved from java (jdk) 1.4.2 to 1.5.0_03.
> I'm using ant 1.6.1 (I've tried ant 1.6.5 also, but the problem still
> exists)
> 
> After deleting all classes and compiling using the javac task (target name
> is compile, see code below), I then compile the source again. 
> The first time I compile (using 'ant compile')it builds successfully.
> When I compile again (without modifying any files) and only on jdk1.5.0_03
> (it works fine on jdk1.4.2) I get the java.util.zip.ZipException.
> 
> Has this happened to anyone? Any ideas on what to do to resolve it?
> 
> Thank you for your time,
> 
> Fabricio
> 
> Code below....
> 
> ---- Start of build.xml compile target ----
> <!-- Compiles Application -->
>   <target name="compile">
>     <javac srcdir="${home}/${src}" destdir="${home}/${classes}"
>            classpathref="compile-classpath"
>            debug="on" optimize="off" deprecation="on"/>          <-- line
> 105 on build.xml (see output, below)
>   </target>
> ---- End of build.xml compile target ----
> 
> 
> ---- Start of Ant Output ----
> C:\current_with_version>ant compile
> Buildfile: build.xml
> 
> compile:
>     [javac] Compiling 13 source files to C:\current_with_version\classes
>     [javac] error: error reading
> C:\current_with_version\classes\com\esp\cost\CostElement.class; jav
> a.util.zip.ZipException: error in opening zip file
>     [javac] Note: Some input files use unchecked or unsafe operations.
>     [javac] Note: Recompile with -Xlint:unchecked for details.
>     [javac] 1 error
> 
> BUILD FAILED
> C:\current_with_version\build.xml:105: Compile failed; see the compiler
> error output for details.
> 
> Total time: 48 seconds
> ---- End of Ant Output ----
> 

-- 
Maury Feskanich
 DReAM Support


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message