Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generic compiler abandons backwards compatibility?

843793Nov 8 2002 — edited Jul 30 2004

If I understood the intention correctly, one of the design decisions for the Generic Java compiler was to maintain backwards compatibility with old JVMs. This decision was seemingly abandoned as of the latest (1.3) prototype release of the generic compiler, and I hope it's not intentional.

It appears that the new way to indicate to the compiler that code contains generics is to use the "-source 1.5" flag instead of -gj.

I have intentionally used the "-target 1.1" flag to the compiler to make sure that my code works with older JVMs. This worked fine for the last couple of years. This no longer works, as this causes the compiler to abort immediately with the error message"

javac: source release 1.4 requires target release 1.4

Of course, I used "1.5" as the source so this error message is in itself a bug.

Why and when was backwards compatibility dropped? If Sun is going to eliminate backward compatibility, are you also going to make some of the changes that are used in other compilers (such as Pizza) that would benefit the language?

Needless to say, this is a complete showstopper for me--I can no longer use the Generic Java compiler and maintain backwards compatibility with older JVMs. If this error message is caused by some overzealous, incorrect check, can it be removed as soon as possible and a new prototype released?

I cannot underestimate the importance of backward compatibility and the ability to use the Generic compiler for my Frink project, which has been using the generic compiler happily for almost 2 years. I'm very worried that backward compatibility was silently dropped.

http://futureboy.homeip.net/frinkdocs/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2004
Added on Nov 8 2002
12 comments
236 views