CC Recompiled to 1.5 for Mac

Ok, going to need some help on this one

see bug 2497872 and support request 2496236

I have recompiled the new custom code for 1.5 compliance and replaced it but the Mac testers are still getting the same problem with the new test mod

Except for the new code I added there are two other custom components
Terrain and Calculated Properties.

Brent created these a good while back and these components already existed in previous versions of the module and have not changed since or we would have seen this problem a long time before.

I am baffled as to what to do next as there doesnt seem to be any reason for this problem anymore so need some direction as I cant read the ABR’s as good as you guys can :slight_smile:

Ok, seems that my recompile for backward compatibility didn’t work even
though I had the project set for 1.5 compatibility.
Is there anyway to verify after it has compiled that it has in fact compiled
properly for 1.5 besides having someone test and generate ABR’s?

Post generated using Mail2Forum (

Ive recompiled the source and replaced the updated class files 2 times now but each time the Mac testers keep getting the ABR.
I must be doing something wrong trying to make it 1.5 compatible.

This class is the problem because if it is removed from the mod, the problem goes away.

Could someone who knows what they are doing recompile the source file (attached) for me for 1.5 compatibility and attach the new class files here



Try this,


Brent Easton
University of Western Sydney

Messages mailing list …

Post generated using Mail2Forum (

Thanks Brent,

Still no luck. While the Mac testers say the module now works after you past this ABR at start up, it’s still showing up (see today’s ABR’s)

Is there something else we are missing or something in the source code itself which is causing the problem? Like I said, remove this class from module and there are no ABR reports generated.

Now I’m stumped! :slight_smile:

On Jan 10, 2009, at 9:22 AM, Tim McCaron wrote:

There is some software that will examine class and jar files and tell
you what version they are compiled with. The mapping from binary
class versions to JDK release versions is a bit tricky, but there are
some hints.

Look at … erApp.html

Messages mailing list …

Post generated using Mail2Forum (

Thanks! Problem fixed :slight_smile:

The bad class bug reports should cease showing up on SF after I get the fix
posted. The support requests and ABR’s for this can be closed

Post generated using Mail2Forum (

Thus spake “Tim McCaron”:

What was the problem?


Messages mailing list …

Post generated using Mail2Forum (

The Bcver app revealed that the Expression Parser class for Calculated
Properties was 1.6.
I forgot when Brent wrote the addition of SumLocation for the package way
back I had to add it into the parser funtab list to make it work when I was
testing it

Post generated using Mail2Forum (

Thus spake “Tim McCaron”:

Something we should have in out documentation for module designers is
how to make sure that all of your classes are 1.5-compatible.

Another thing which just occurred to me is that we should add a class
file version checker to the Editor—something which checks that classes
are compiled for 1.5 compatibility, and maybe have it run when you save
a module.

It isn’t very hard to do version checking. I looked at the code for bcver
just now and found that most of the code is convenience methods and
“packaging” code. The code which does all of this amounts to about 10 lines.
If you have a stream containing a class file, then this gets you the raw
bytecode version:

DataInputStream dis = new DataInputStream(is);
int magic = dis.readInt();
if(magic == 0xCAFEBABE) { // this is the magic number for a class file
raw = dis.readInt();

The raw version number is stored with the minor part in the high bytes and
the major in the low bytes.

int major = raw & 0x0000FFFF;
int minor = ((raw & 0xFFFF0000) >> 16) & 0x0000FFFF;

We’d like to have these reversed for our test:

int ver = ((raw & 0x0000FFFF) << 16) | ((raw & 0xFFFF0000) >>> 16);

Anything in the range [45.0,49.0] will run on Java 1.5, so the test we need

if (0x002D0000 <= ver && ver <= 0x00310000) return “1.5 compatible!”;

So, there’s the nuts and bolts if someone wants to put it together.


Messages mailing list …

Post generated using Mail2Forum (