
308 Chapter 7 • Securing Your Java Code
The first thing we are going to try is creating a keystore file and
generating a key-pair for ourselves.The simplest way to do this is by
using the -genkey argument with no other parameters.The keytool will
prompt you for all the information it needs (see Figure 7.18).The
downside of using no other arguments is that everything is given default
values, except for the information it requests. For example, the certificate
is only good for 90 days and the keystore uses an alias of “mykey.”
After it has finished executing, it will have created a keystore file in
your user.home directory.This keystore file will contain y