Skip to Main Content

Java Programming

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Java Backward Compatibility

Artful DodgerApr 23 2022

https://community.oracle.com/tech/developers/discussion/4497751/java-backward-compatibility/p1?new=1
I am in a bind with respect to compatibility of different java versions, so I will start with the following:
My understanding has been that the JRE will run java compiled with the 'current' java compiler, or any java compiled by an earlier java compiler, i.e. the JRE is backward compatible with class files from former versions of the compiler.
I set about looking in books and on the internet to verify my thought. My java books are quite old and I could not find a statement to confirm this. On the internet, I have found some documentation:
https://docs.oracle.com/javase/tutorial/collections/interoperability/compatibility.html
https://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible
https://stackoverflow.com/questions/54439762/java-jdk-11-breaking-old-jars-programs
Am I correct then, that with some exceptions, java JREs are backward compatible with class files compiled in former releases?
I will likely have follow up questions, but I'd like to this issue settle in my mind first.
Jim A.

Comments

843834
Did you include your parser jar file in the archive tag? Thats required.

<applet code="Some.class" archive="some.jar, parser.jar" width=100 height=200></applet>
843834
Thank you very much Sir. Please inform me of the methods involved in assigning duke-dollars so i can give you some.
1 - 2

Post Details

Added on Apr 23 2022
0 comments
222 views