Join our affiliate network and become a local SSL expert

♦ learn more about our program ♦
picture of tbs certificates
picture of tbs certificates
Our products range

Generate a Keystore and a CSR for Oracle Java / JDK / J2ME

Before you start, make sure you have a recent JSE (Java Standard Edition) on your machine. On a Linux distribution, this is usually present. For a Microsoft Windows operating system, you must install at least Java Runtime (JRE).
Here is a link to the download page:Download JAVA

Then on Windows, launch a command prompt with administrator rights and go to the installation path of JRE (by default "C:\Program Files\Java\jre1.X.X_XXX\bin")

1- Create the private key

To create the key, you'll need to define an alias (the name in full) and a storename (the file's name). Keep the alias you provide in mind.

keytool -genkey -keyalg RSA -keysize 2048 -alias [alias-name] -keystore [storage-name.jks]
Define a password for your store file. Then fill in the fields:
What your first and last name?

What is the name of your organizational unit?
  [Unknown]:  test

What is the name of your organization?
  [Unknown]:  Votre nom organisation

What is the name of your City or Locality?
  [Unknown]:  Paris

What is the name of your State or Province?
  [Unknown]:  Paris

What is the two-letter country code for this unit?
  [Unknown]:  FR
Confirm (oui or yes):
Is, OU=test, O=The name of your organization, L=Paris, ST=Paris, C=FR correct?
  [no]:  yes
Provide a password for this key, press ENTER to use the same password you defined for the store file:
Enter key password for [keystorename]
The store file is created. Check with
keytool -list -keystore [keystorename]
Make a backup copy of the file created in the JDK/bin directory or in the current directory.

2- Generate a CSR

keytool -certreq -alias [alias-name] -keyalg  RSA -file [mon.csr] -keystore [storage-name.jks]

Enter Keystore password:  
The CSR will be created in JDK/bin and look like that:

You can also use our CSR creation tool available here: Help with the creation of CSR. Fill in the required fields and click on "Generate". The command line to copy and paste will appear under "Java Keytool Syntax" and it will generate both a keystore and the CSR.

3- Finalize the order process

Use the appropriate link to place your order on our website. See Access an order form

To install the resulting certificate, see Install an Oracle Java certificate.

Useful links