jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes Java backward compatibility ?s Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java backward compatibility ?s" Watch "Java backward compatibility ?s" New topic

Java backward compatibility ?s

Yu Chen

Joined: Feb 11, 2002
Posts: 17
Not sure which categoty it fit better, but let me ask some other backward compatibility ?s.
- If codes were compiled on JDK1.1, will it run correctly on JVM/JRE1.4.0?
- If codes were compiled on JDK1.2, will it run correctly on JVM/JRE1.4.0? Is this
better than the previous case?
- If codes were compiled on JDK1.3, will it run correctly on JVM/JRE1.4.0?
I am trying to analyze the impact of migration from Netscape4.x (with JRE1.1.1) to Netscape6.2.1(with JRE1.4.0Beta).
Thanks in advance!!
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
background compatiobality is complete as far as i know.
anything u compiled in 1 2 or 3 would work perfectly in 1.4 .
however the opposite wont work.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Please change your name to be compliant with JavaRanch's naming policy.
Your displayed name should be 2 separate names with more than 1 letter each. We really want this to be a professional forum and would prefer that you use your REAL name.
Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Hmm.. Sounds like you are getting your wording mixed up. Backward compatibility is when your code is able to run in previous versions of systems. In this case we are talking about our JVM as a system. So if you were compiling your code in 1.3 JVM it would run in 1.2 JVM. Backward compatibility depends on the methods you are using and if those methods are still used in the new JVM [not deprecated]. Or do you really mean forward compatibility? This is when your code in your code in 1.2 JVM would run in 1.3 JVM. If you mean this then the question is mostly yes. Again it depends on the methods that you are using and if those methods are deprecated or not. In both cases you want to make sure all the methods you are using are not deprecated. Usually you will get a warning when things are deprecated.

By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023

A follow up question:

When a method has been deprecated, does Sun publish data on when (in what new version of Java) that method will no longer be available?

Thank You,
-Dirk Schreckmann

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
The truth is, no one knows that. As APIs evolve, methods will get deprecated to encourage developers to start using other methods. It's a good system though; on other platforms/libraries, sometimes you don't get a warning. You just get a bunch of compiler errors when you try using the latest version of the library.
Deprecation is like the yellow light on American traffic signals...it's letting you know that a red light is coming. So if you're a dilgent programmer, as soon as you get a deprecation warning during a compile, you start planning a migration to start using the replacement method. Deprecation also gives you time to do this planning and migration. But the longer you wait, the more likely it becomes that a new version of the JDK will no longer have the method.
However, I'm not aware of a deprecated method that has actually "gone away" yet...but it is bound to happen at some point. There's just no way to predict when that happens.

SCJP 1.4
Don't get me started about those stupid light bulbs.
subject: Java backward compatibility ?s
It's not a secret anymore!