Hello,
can i run an J2EE Application which is written under Java 1.4 in Java 1.6. Only compile 1.6 and then run?
Is there a official documentation about this theme?
Thank you,
Jochen
Each version of the JDK comes with information about backward compatibility, Pushkar provided you already with a link for Java 6.
Backward compatibility has always been very important for Java. Normally you should not have any problems running old applications on a new version of Java. You do not even need to recompile the code - the old compiled classes should run fine. But you should test it first with your particular application - some programmers use unofficial APIs or other techniques that make their programs incompatible with newer versions of Java, it's impossible to guarantee 100% that everything will work.
This message was edited 1 time. Last update was at by Jesper Young
There are two reasons a program may break when upgrading your JVM:
1) programmers have used undocumented classes, like those in package that start with sun, sunw or com.sun. These classes can change or even disappear even between minor JVM updates.
2) there was a bug in the API at the earlier version, and the programmer has created a workaround. That workaround now causes bugs in the code since it is no longer needed.
And, if I recall correctly, there were some new reserved words between 1.4 and 1.6, such as enum. I'm not sure how much of a problem that will cause, but I believe it has been discussed on here before.
SCJA
When I die, I want people to look at me and say "Yeah, he might have been crazy, but that was one zarkin frood that knew where his towel was."
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.