Java Downward compatibility clarification
I need a little clarification开发者_Go百科 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?
unless you are using the incompatibilities listed in sun documents Compatibility
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.
Yes - Java's very good about that.
I'm writing about it here java backwards compatibility.
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
精彩评论