The Java keytool allows your to generate certs that you can use with applications such as Tomcat. The below tutorial will show you how to generate a self signed cert that you can use with your applications.
It starts from the very beginning and shows you how to install Java, set up a key store and generate your jks cert.
This guide will first show you how to download Java JDK.
You will then add java to your path.
Next you will use the Java keytool to create a Java keystore
You will then generate a Self-Signed cert using the Java Key tool.
This cert will be in JKS format.
Finally you will view the certificates in the keystore to see the cert which you generated using java keytool commands.
A full text tutorial can be found here: