my dog learned polymorphism
The moose likes EJB and other Java EE Technologies and the fly likes Jar creation - strange situation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Jar creation - strange situation" Watch "Jar creation - strange situation" New topic

Jar creation - strange situation

PN Kumar
Ranch Hand

Joined: Sep 08, 2001
Posts: 38
The following was the situation i had encountered - built a jar file X using another jar file Y(old).The size of one of the classes in X was 1250 bytes.
X was built using Y(old), classfile in X -> 1250bytes
When the jar file X was again built using jar file Y(new) the size of the same class file in X was 1278 bytes.
X was built using Y(new), classfile in X -> 1278bytes
The ONLY DIFFERENCE in the jar files(Y(old) and Y(new)) was the return type of a certain method in a certain class.
How does the return type affect the size of the class file in the jar being built (X).
JDK version 1.4.1 used - does this have to do anything with the JDK version?
Would appreciate any inputs on this.
[ February 20, 2004: Message edited by: PN Kumar ]
PN Kumar
Ranch Hand

Joined: Sep 08, 2001
Posts: 38
Still awaiting a reply for the above....
Srikanth Shenoy
Ranch Hand

Joined: Jan 24, 2004
Posts: 184
When a return type is added, the resultant byte code due to compilation changes. And so does the class file size

Srikanth Shenoy
Author of Struts Survival Guide : Basics to Best Practices
I agree. Here's the link:
subject: Jar creation - strange situation
It's not a secret anymore!