Thank you for this guide on setting up an AWS EC2 instance to use as a Minecraft server. I've been able to follow your directions and get everything set up, but I'm struggling to get the right version of Java installed on the Amazon Linux 2 AMI instance. I installed Java 8 on the server per your instructions, and I used the same URL to pull down the server.jar file. When I try to launch the Minecraft server I get a message stating the file was compiled with Java 60 and I only have Java 52 running. Any thoughts on how to get the correct match of Java and the server.jar file on the server together?
Thank you sir. From the quick research I did, I can't seem to find an option for Java above V11 for the Amazon Linux 2 OS. Hopefully your research yields better results than mine.
Hi Julien,
Thank you for this guide on setting up an AWS EC2 instance to use as a Minecraft server. I've been able to follow your directions and get everything set up, but I'm struggling to get the right version of Java installed on the Amazon Linux 2 AMI instance. I installed Java 8 on the server per your instructions, and I used the same URL to pull down the server.jar file. When I try to launch the Minecraft server I get a message stating the file was compiled with Java 60 and I only have Java 52 running. Any thoughts on how to get the correct match of Java and the server.jar file on the server together?
Thanks in advance!!
Let me check that it seems that the class version is not correct.
52 is Java 8
60 is Java 17 I think.
Maybe Minecraft server is now requirering Java 17? I will check that for you and update the article 🕵️
Thank you sir. From the quick research I did, I can't seem to find an option for Java above V11 for the Amazon Linux 2 OS. Hopefully your research yields better results than mine.
OK it's related to the Minecraft version, as 1.17 is now requiring Java 16 (instead of Java 8 on 1.16.5, that's a pretty big move!)
minecraft.fandom.com/wiki/Java_Edi...
I will update the article to be sure to download 1.16.5 because it seems less easy to get Java 16 on Amazon Linux 2.
Thanks !
Julien, I think I found the way to get a higher level of Java on Amazon Linux 2 using the Corretto library. Here are the commands:
sudo rpm --import yum.corretto.aws/corretto.key
sudo curl -L -o /etc/yum.repos.d/corretto.repo yum.corretto.aws/corretto.repo
sudo yum list available | grep java
sudo yum install -y java-17-amazon-corretto-devel.x86_64
sudo update-alternatives --config java
Select the Corretto Java 17 from the list
big thanks for digging that! I will update the article ASAP and test on my minecraft server !
done @mudhen459 thanks a lot !