Minecraft is designed to run on java 8 you need to install openjdk8 and run it as openjdk 8