This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes Java Compilers Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Java Compilers" Watch "Java Compilers" New topic
Author

Java Compilers

Arjun Anand
Greenhorn

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.
------
Arjun


Arjun
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18670
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: http://aspose.com/file-tools
 
subject: Java Compilers
 
Similar Threads
byte code
Java ME & iOS
JIT compiler
Problem with Reflection...Incorrect sequence of methods returned.
Executing Java file inside a jar file