File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Compilers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Compilers" Watch "Java Compilers" New topic

Java Compilers

Arjun Anand

Joined: May 24, 2001
Posts: 25
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.

Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
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...

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: Java Compilers
It's not a secret anymore!