ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: AW: java bytecode produced by "Ant javac" different from "command line javac" bytecode
Date Fri, 20 Nov 2009 22:04:06 GMT

Hello all and thanks for your replies

By different I mean that once decompiled (with jd) or dissassembled with
javap, the resulting files are different.

In order to use the same javac options on the command line, I ran Ant with
the -debug option.  
That being done I was able to copy the arguments Ant sent to javac.
With all the information provided by the Ant-Javac, I was able to, through
the command line Javac compile the exact same class.

And the bytecode produced is different.

In both cases, I use the javac provided with the JDK(1.5)

<javac srcdir="${}"
destdir="${component.path.classes}" debug="on"
executable="C:\JDK1.5.0\bin\javac.exe" compiler="classic"  source="1.5"


--Command Line--
>C:\JDK1.5.0\bin\javac -d ... -classpath ... -sourcepath...   -g -source 1.5 -target 1.5

Please help!!!!!

Knuplesch, Juergen wrote:
> You probably use a different JDK (e.g. Eclipse uses his own javac) or
> different options. 
> What exactly do you do in Ant javac and the other javac?

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message