I have a JDK 1.5 code base (a few hundred files) that is auto-generated
and uses 1.5 language features, mostly generics as far as I know. I
want to compile this and run on a 1.4.2 JVM.
I have done some reading here and am proceeding by
Compiling the code with a 1.5 javac with -target jsr14
I have run the generated class files on a 1.4.2 JVM with no initial
problems.
Does this seem like a reasonable approach? Are there any hidden
"gotchas" that might come up at runtime?
Note that I also must ensure that there are no 1.5 specific objects or
methods in my code base.
FGB
Thomas Hawtin - 12 Apr 2006 15:17 GMT
> Compiling the code with a 1.5 javac with -target jsr14
> Does this seem like a reasonable approach? Are there any hidden
> "gotchas" that might come up at runtime?
Well, it isn't supported, may be full of bugs, might not match the
actual specs and may be removed at any time.
Tom Hawtin

Signature
Unemployed English Java programmer
http://jroller.com/page/tackline/
au714@osfn.org - 12 Apr 2006 17:30 GMT
Heh, are those the only issues you can think of :)
VisionSet - 12 Apr 2006 16:22 GMT
> I have a JDK 1.5 code base (a few hundred files) that is auto-generated
> and uses 1.5 language features, mostly generics as far as I know. I
[quoted text clipped - 12 lines]
> Note that I also must ensure that there are no 1.5 specific objects or
> methods in my code base.
You could use Retroweaver
--
Mike W