I work on migrating an Application that works with JRE1.4. As part of the migration, When i run the existing Application code without compiling to JDK 5, it works fine Java 5.
When I tried compiling my application using JDK 5, there's no error reported. But when I run the application find that it throws AbstractMethodError using JRE 5.
My application refers to proprietory Framework Jar files that's not recompiled for JRE 5, is that causing the AbstractMethodError issue ..?
Also would like to know in case of migration where we have reference to some proprietory/open source Jar files, is it required that we get the migrated/recompiled version of those files.. so that the application compiled on JDK 5 works seamlessly with the reference Jars.
Would appreciate if there are some insights on the migration process and correct the understanding.
Why are you migrating to an unsupported platform that's been obsolete for years? Java 6 should be your new platform.
And no, dependent libraries do not need to be recompiled, just like your Java code does not need to be recompiled. This particular issue should be very rare; in all likelihood, the dependent library will have a newer version available that addresses the issue. If not then it's quite old and unsupported, and you should move away from it.
If I were to go out on a limb I'd say that your dependent library is possibly a JDBC driver (or tool).
Joined: Jan 16, 2001
Will be migrating to Java 6 or Java 7. This is just a test run kind.
I think all JDK versions have backward compatibility. So if you are using JDK5 on code that was made in JDK4 it should compile fine. Don't understand your question completely. But there is a difference between JDK and JRE. If you think JDK to be your car then JRE is your engine.
Joined: Sep 21, 2011
Tim Moores wrote:If I were to go out on a limb I'd say that your dependent library is possibly a JDBC driver (or tool).
I also would like to know, without compiling the Application for the JRE 5 or 6 does the application bring in Performance enhancement provided as part of the Java higher version [5/6/7] unless we use the language features ?
Joined: Sep 21, 2011
Yes. Those improvements are predominantly in the JVM (and, to a lesser degree, in the class libraries), not in the compiler or in the new syntax.
There are a few changes which might cause problems, eg use of the word enum as an identifier, different method calls when overloaded methods might be called with boxed primitives as arguments. But I think (definitely not certain) that you would only have such problems if you recompile the code.
You might get all sorts of compiler warnings about missing generics, but if the code worked on Java1.4 without generics, I can’t see that you will have any new problems.
Sun and Oracle have always been very careful to make sure newer versions of Java are backward compatible with older versions. You should be able to run your old Java programs unmodified on newer versions (recompiling is not necessary). However, there can be minor incompatibilities. Each new version of the JDK comes with documentation about possible incompatibilities with previous versions: