The following uses the cross platform open-source Keystore Explorer (http://www.keystore-explorer.org/). Other tools are available.

Create a self-signed certificate in Keystore Explorer

Return to Java installation

Use an existing certificate pair 

When you already have a key pair to use, e.g. if you are upgrading from another type of SAML software such as Shibboleth.

First get your public and private keys ready as separate files, then in Keystore Explorer...

 

Return to Java installation