- A Concurrent Affair - https://www.concurrentaffair.org -

Eclipse Java Compiler for DrJava

I finished integrating the Eclipse Java compiler [1] into DrJava [2]. This
made the DrJava executable about 1.1 MB bigger, but it has the benefit
that DrJava users don’t necessarily have to have the JDK installed
anymore: As long as they run DrJava with Java 6, they will always at
least have the Eclipse Java compiler available (but not the debugger).
I think this is an important improvement since getting the “No
compiler available” error was one of the most frequently reported
problems.

The Eclipse compiler I’m using is a modified version 3.6M6. I could
not use the latest release 3.5.2 because of a bug that prevented any
errors from being reported to a DiagnosticListener. After I had
diagnosed that problem, I found out that the bug had been fixed for
milestone 3.6M3. I discovered that this release has another bug,
though, which prevents a DiagnosticListener from receiving information
about the source file that contains a compiler error.

I filed a bug report [3] with Eclipse and fixed the
bug in a modified copy of the Eclipse Java compiler 3.6M3 currently
kept in our repository. It works in *our* case, but the Eclipse
developers won’t be able to use the exact same solution without losing
some generality. I’ll see what they do, and when they fix the problem,
I’ll replace our modified version with their solution.

Please take a look at our latest weekly release [4]. If you are
running Java 6 or later, you should be able to select the Eclipse
compiler. It still prefers the other compilers, but on systems with
the Java 6 JRE but without JDK, users of this version now at least
have a compiler available.

I still have to include the Eclipse license text in the program, the source and on the website, but I’ll get to that.

Let me know what you think! Thanks.

[5] [6]Share [7]
3 Comments (Open | Close)

3 Comments To "Eclipse Java Compiler for DrJava"

#1 Comment By StephenGilbert On April 8, 2010 @ 17:35

Thanks very much for this. I struggled writing a compiler adapter and trying to do it myself, but was never able to get the error reporting to work at all. I believe that this will be very useful for my students. (I received the SourceForge notification in my email, but I haven’t for the life of me been able to figure out how to reply to a comment on SourceForge.)

–Steve

#2 Comment By Mathias On April 8, 2010 @ 17:49

You’re very welcome, Steve. It never occurred to us to include the Eclipse compiler until you suggested it, so thank you very much for your help.

By the way, I tend to close SourceForge feature requests and bug reports as quickly as possible and disallow further comments in order to reduce spam.

#3 Pingback By A Concurrent Affair » Blog Archive » Eclipse Compiler Bug Fixed in 3.6M7 On April 27, 2010 @ 13:30

[…] to an update to the Eclipse bug report 308256 I filed when I was working on integrating the Eclipse Java compiler into DrJava, the bug will have been fixed in […]