You can have more than one installation of JDK on your system. For example, I have JDK 1.4, and JDK 1.5 installed on my Linux Fedora box. It all comes down to setting the PATH ENVIRONMENT.
On my machine, I have two user accounts, each using a different JDK on their path. So, when I want to test something on JDK1.4, or JDK1.5...I just switch accounts.
I believe that you can do the same thing on Windows XP as well. Just add the jdk path on "User Variables for user_account" for the account that you wish to have jdk1.4 for example, and set jdk1.5 for the second account similarly.