Yes, Java moss can survive on land. Java moss can grow out of the water despite being an aquatic moss, albeit more slowly.
However, like other non-vascular plants, it needs to be kept in a humid environment or it will eventually dry out and die.
If you wish to grow Java moss on land, here are some pointers you need to know:
- Provide plenty of water
- Keep its habitat’s humidity at 80–100%
- Spray its leaves with water regularly
- Avoid planting it in a substrate
- Attach it to a solid surface, like rocks and driftwood
- Provide it with bright lighting to accelerate its growth