Skip to main content
gamedev.net
🔒 Locked

[java] Eclipse JDT uses own compiler?

Started by FiveFootFreak 6 replies 2.8k views
Original Post
FiveFootFreak
FiveFootFreak
Greetinx, I was searching the Eclipse site for info on when the new Java 5 features will be supported, when I stumbled onto this:
Quote:
JDT Core is the Java infrastructure of the Java IDE. It includes: An incremental Java compiler. Implemented as an Eclipse builder, it is based on a JCK1.3a compliant compiler evolved from VAJ compilers. In particular, it allows to run and debug code which still contains unresolved errors.
What does this mean? I thought Eclipse uses the javac compiler of the JDK you specify, but this sounds, as if Eclipse has its own compiler. Here is the whole document: http://www.eclipse.org/jdt/index.html
Morbo
Morbo
Yes, Eclipse uses its own compiler. You don't even need to have a JDK installed to use Eclipse, just a JRE. It's a pretty cool compiler, too: it's able to incrementally compile each file. So if you change just one method, that's all it will compile. This allows Eclipse to literally compile as you edit.
capn_midnight
capn_midnight
it also means that eclipse does not necessarily support the same features as the sun compiler, for example: generics. It's supposed to show up some time in february, though.
FiveFootFreak
FiveFootFreak
So, does the Eclipse compiler produce the same bytecode as the Sun compiler in the end? And if not, is there a significant difference in performance between these two?

If it says "15% performance increase in next Java version" on the Sun website, does it affect Eclipse developers at all? What has the greatest impact on performance, the compiler or the VM used?
jollyjeffers
jollyjeffers
Quote:
does the Eclipse compiler produce the same bytecode as the Sun compiler in the end?
it has to. Sun's source code licence (what IBM (+others) will be using) will dictate that any derivative also called Java follows the standards. Even if the internal workings (e.g. incremental compilation/linking) are different.


Quote:
What has the greatest impact on performance, the compiler or the VM used?
I'm ready to be proven wrong, but i'm pretty sure it's the VM that you wanna pay attention to (at which point Eclipse isn't a problem). At least in recent releases (Java 1.x.y / "Java 2") are required to compile down to the same byte code standards. I think the part that'd stop a 1.4.2 compiled program not running on a 1.3.0 JRE is that the 1.4.2 code might use different features/functions that aren't in 1.3.0, not that the actual byte code uses different instructions/layouts.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
pgeremia
pgeremia
Hello,

I have just basically gone through dealing with RMI serialization and the Eclipse compiler. If you do not specify a serialVersionUID the java compiler will create one for the serialized class. It turns out that the Eclipse compiler generates a different serialVersionUID than the Java compiler. Before that happened and I had to research it I had no idea that Eclipse used its own compiler. This has been a very frustrating experience. So does anyone know if you can have Eclipse use the native Java compiler from Sun?

Thanks,

Pete Geremia
capn_midnight
capn_midnight
quite frankly, knowing the reputation of Sun and its history with Java, I would use a 3rd party compiler in a heart beat
Tanaric
Tanaric
Eclipse fully supports generics now. Get the M4 build.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.