If you want to test your Java application which requires digital certificates, here's a collection of such certificates with associated public/private keys in .jks format (the Java standard format - Java Key Store).
For example, you can use these to test Web services or enable SSL support of a Java server (and clients - if you want).
The X.509 keys and certificates were generated using a script that I wrote some time ago to automate the task. The script internally uses the keytool and openssl commands. You can download the script from http://www.swview.org/jkscertgen . You can use the script in a production environment as well. Or else, just go through the script to understand the key and certificate generation process.
After downloading the zip file found below, go through the README file bundled inside the zip which contains the passwords and other details.
WARNING: Don't use the keys or certificates included in the zip file in your production application since anyone can just come here and download everything. These keys and certificates are for you to test your applications. If you want keys and certificates for your production application, you may use the above said jkscertgen script to generate a unique collection of keys/certificates for your use. Open and edit the script to specify principles, passwords etc before executing it.