kunaguvarun
kunaguvarun

Reputation: 711

Java Downward compatibility clarification

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

Answers (5)

lisak
lisak

Reputation: 21981

I'm writing about it here java backwards compatibility.

Upvotes: 1

Piyush Mattoo
Piyush Mattoo

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

Fedor Skrynnikov
Fedor Skrynnikov

Reputation: 5609

unless you are using the incompatibilities listed in sun documents Compatibility

Upvotes: 6

Ed Staub
Ed Staub

Reputation: 15700

Yes - Java's very good about that.

Upvotes: 1

T.J. Crowder
T.J. Crowder

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

Related Questions