Just use one you're familiar with. If you value security over ease of use, an up to date CentOS with a long term support it's the way to go. Debian is also a good choice if you're already familiar with Ubuntu.
Also, you can compile directly during deployment without Eclipse, using JDK + Apache Ant. It is very useful when you are using Github Actions/Gitlab CI and want to compile it before the deployment, passing then the built artifacts to the continuous delivery integration.
If you're new to all this DevOps stuff, just do what reynalDev said. Compile it on Eclipse and upload the server manually.