Am Sun, 1 Nov 2015 16:34:13 -0500
schrieb aalok singhvi <[email protected]>:

> Hello,
> I have a basic question...
> 
> If i compile a simple hello world java program using javac in ant i
> get a different size as compared to class compiled with maven plugin.
> My java source and target it 1.6.
> 
> What is the reason. Can anyone help me with this. I will really
> appreciate your help.

There are multiple compiler settings which can influence class size.
Including debug information (source file, line, local vars - defaults
to on in Maven and off on Ant) and I guess presence of some annoation
processors.

Are you using the same java version for compiling with Ant and Maven?
(and youare sure you do not use eclipse or jikes?
https://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html)

Ithink you could dump the classes with "javap -l -c -s -p -verbose" to
see potential differences. How big of a difference do you see?

Gruss
Bernd

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • Class size aalok singhvi
    • Re: Class size Bernd Eckenfels

Reply via email to