Reputation: 711
I need a little clarification regarding JRE. Is it downward compatible? I mean if I develop an application using java5 and if the target has the latest java6 will my application be able to run?
Upvotes: 1
Views: 312
Reputation: 16153
The bytecodes generated can be run in future releases of jvm
however the compiler is not backward compatible as bytecodes generated with higher version won't run in older version. This is a good read on Sun site here
Upvotes: 0
Reputation: 5609
unless you are using the incompatibilities listed in sun documents Compatibility
Upvotes: 6
Reputation: 1075785
Yes, provided you're not using really old deprecated APIs (like, ones deprecated in v1.1)...and maybe even then.
That's APIs. The bytecode is absolutely forward-compatible. It's been revised a couple of times, but always in a forward-compatible way. So code compiled with JDK 1.4 runs fine in the latest; but code compiled with the latest may not run with an older JVM.
Upvotes: 1