Cannot Setup Vanilla Server

I am trying to setup a vanilla server but I always get this exception.

There is a directory called “libraries” created and “minecraft_server.1.12.2.jar” is downloaded. Nothing more. When I try to start the server again then, I get this exception.

That is the output of “java -version”:
java version “12.0.2” 2019-07-16
Java™ SE Runtime Environment (build 12.0.2+10)
Java HotSpot™ 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

What is causing this issue?

Regards

Hello,

In order to run a Minecraft server, you must be using Java 1.8.
Anything newer will not work due to some changes made.

Alright. Thanks for the help.