i have a server - client application that runs on java 1.3; i want to change to java 1.6 step by step, meaning first few clients, than rest of the clients and finally server... i was wondering could you direct me to some common problems that can come along and what should i look after?
Sun tries to keep a high level of backward-compatibility, so you possibly simply can install the new JVM and restart your application with it.
A document describing the backward-incompatibilities from Java 1.6 with earlier version is here. This document links the compatibility-documents for Java 1.5 and Java 1.4 as well. You probably want to read this documents to learn about possible pitfalls.
Java 1.5 and Java 1.6 introduced new class-file-formats. The JVM's will run the old class-files as well, but recompiling your code - especially with JDK 1.6 - will help the new JVM to take advantage of some changes to make your application faster. So you might consider recompiling.
Additionally some new keywords were introduced, namely assert (in 1.4) and enum (in 1.5) (as Yuval already mentioned). If you use these words as identifiers, a recompile will fail, but the old class-files will work. You can provide the switch -source
to javac to let it compile: 'javac -source 1.3
' will compile the code without assert and enum as a keyword.
Off the top of my head, look for the names enum
and assert
in fields and local variables... These words have become keywords in java 1.4 and 5. The java 6 compiler will mark them as compilation errors if it sees them.
Yuval =8-)
Sun keeps a list of incompatibilities that are introduced with each new version of Java.
The last document for 1.4.2 has links to the compatibility notes back to JDK 1.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With