From my experience, you can install it on a different machine, copy it to your machine and it should just work if you change your path or use absolute path names when invoking the exe's and, if necessary, configure JAVA_HOME to point to it.
In regards to the other response if you need to do it on a single machine then I suggest you uninstall all versions FIRST. Then install the oldest one you need. Copy the tree for that version. Then UNINSTALL it. And continue in that way until you get to the last version.
This can become more complicated if you need to test certain things such as determining which version is installed (newer versions can impact the system in this regard.) Then either you are left with uninstalling/installing or your create VMs with each version.