How to create a free host certificate for Java applications

Can be used for example for Jenkins.