Two Confusing Errors

A while ago, I was told by our one-and-only client of Mint that the version of DrJava with Mint does not display Mint as a compiler, even though it is included in the jar file and therefore should be available. I couldn’t reproduce this, so I set it aside for a while.

Yesterday I realized that there was a logic problem with the “show all compiler versions” preference in DrJava. By default, it is disabled, and that means that DrJava will only show the “best” compiler of each major Java version: Only one Java 6 compiler is shown, and in our notion of “best”, all Java 6 compilers (Sun, Apple, OpenJDK) are “better” than Mint. This was done to avoid using Mint as the default compiler. As a result, if “show all compiler versions” is disabled, Mint is never shown.

I rewrote the logic for this preference to treat compilers from different versions separately, but in doing so, I ran into a very confusing problem: My changes to JavaVersion.FullVersion didn’t seem to “stick”. I’d make changes to the plt.jar library, compile it, copy the plt.jar file into DrJava’s lib directory, rebuild DrJava, but still get the old behavior. I eventually resorted to writing the code in a much more complicated way that didn’t involve changing plt.jar.

On my bike commute to work today I realized what the problem was: The ConcJUnit jar that I started linking with DrJava a while ago included its own version of JavaVersion.FullVersion, and I wasn’t rebuilding ConcJUnit! So what I needed to do is create a ConcJUnit that doesn’t include dependencies like the plt library. One of our other DrJava developers, Dan Smith, had of course long realized that and included such a “jar-base” target for his libraries… Smart!

Because of the explosion of ConcJUnit distributables, I have decided to only make the most important ones available. Right now, that is a version corresponding to JUnit 3.8.2, and one corresponding to JUnit 4.7. The 4.x versions in between won’t be released by default anymore.

The files released are:

concjunitrt.jar
The processor for the runtime environment (necessary to emit “lucky” warnings).
concutest-junit-version-src.jar
The source code.
concutest-junit-version.jar
The stand-alone binary, without the runtime processor (concjunitrt.jar), but with all required dependencies.
concutest-junit-version-withrt.jar
The stand-alone binary with the runtime processor and all required binaries.
concutest-junit-version-withrt-nodep.jar
The binary with the runtime processor but without dependencies (namely the plt.jar file).

I’ll make a new ConcJUnit release soon, and also create a new DrJava with Mint jar file.

Share

About Mathias

Software development engineer. Principal developer of DrJava. Recent Ph.D. graduate from the Department of Computer Science at Rice University.
This entry was posted in Concurrent Unit Testing, DrJava, Mint, Ramblings. Bookmark the permalink.

Leave a Reply