Ok, I now googled a bit more, and I realised that I installed the wrong java thing.
I installed the java runtime environment instead of the Java SE Development Kit... I installed the other thing now and it works.
Thank you for the help and I am sorry for wasting your time.
This command did not work, but when I searched for java in the window that opens when I press the windows key (I have no Idea how that's called), I was able to find a "Info about Java" thing, which says:
Version 8 Update 361 (Build 1.8.0_361-b09)
When I try to install new servers (version 18.2 and newer versions) I get this error "Error: Main class @user_jvm_args.txt couldn't get found or load." (error message roughly translated into english) when I run the "run.bat" file.
After testing a bit I noticed that it just cant load or find any txt files, no matter if I have the @ at the beginning or the entire path.
(I am using windows 10.)
I was able to install a 1.12.2 server (where I just had to run the universal jar) without any issues.