• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Compilers

 
Arjun Anand
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have a doubt regarding compilers in Java. Do all the compilers produce the same size of byte code or does the size of the byte code i.e. the .class file varies from compiler to compiler.
Actually I'm using Oracle JDeveloper ver 3.2.2 and Forte for Java C.E ver 3.0. When i compiled one of my files in the JDeveloper it gave me a .class file of size 28k whereas the same file compiled in Forte gave a .class file of size 26k. Both class files seem to be working perfectly.
Hope somebody throws light in this issue.
------
Arjun

 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you've answered your own question. There are often many possible ways to legally translate a Java file into a class file, and different compilers can and do implement this differently. If you're really interested, try using a disassembler like javap (included in Sun's SDK) to see exacly what the class files are doing, and how they are different. Have fun...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic