All versions
Java 8
Minecraft 1.6.1 was released on 2013-06-28. Mojang's version file lists Java 8 for it, for both the game and a server.
See which Java you have:
java -version
Download Java 8 from Adoptium