If it's humid enough in the area above the water, it will survive fine. If your other tank is open-top, I suppose it depends how far out you want the java moss to be.
I'm sure that it will stop growing when dried out... that is to say, I'm not sure whether it is secretly still alive when it's...