Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar creation - strange situation

 
PN Kumar
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still awaiting a reply for the above....
 
Srikanth Shenoy
author
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a return type is added, the resultant byte code due to compilation changes. And so does the class file size
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic