How to List Java Keystore

We had learn Java keystore with different Option from following Post Java Keytool Commands and also we had seen how to create simple keystore file from this Post Generating Java KeyStore using Keytool utility.

In this Post we will see how to list the Java Keystore file or view Java keystore file.

-list Option is used to list the keystore file.

Generating Java KeyStore using Keytool utility

As we all know about Java keystore utility as keytool can used to generate keystore and maintain certificates based on its entity.  Please see for my post Java Keytool Commands for more details.

In this post we will see how to generate a keystore by providing different options.

Java cacerts


Cacerts are default Trust store provided by every JVM vendor. We will see this cacerts file under JRE/lib/security folder. 

Cacerts are also known as Java Standard Trust Store which hold all public certificates.

Now we can list this Trust keystore we can see different digital certificates, to open this store we need to give default store password as "changeit".


Java Keytool Commands

Lets take a look on Java Keytool and its Commands in detail.

What is this Keytool and where do we find.

Keytool is java utility which is used to managed the keys and certificates.  This java utility allow user to administer their own public and private key with associated certificates. 

Addressing this into simpler way, Keytool is a java tool or utility which binds Private , Intermediate and public certificate together for securing your message and transport level system. 

Java Keytool Implementation

Currently there are three ways to generate the Keystores through command line using Keytool or jarsigner and through GUI we can use policytool.

Lets take a look more details on Keytool command.  To execute the keytool we required rt.jar and tools.jar.

rt.jar will be under JAVA_HOME/jre/lib  directory and tools.jar can be find under JAVA_HOME/lib.

keytool utility is run thorugh following class "KeyTool" and package is "sun.security.tools" and its class type is final.

Java KeyTool

Java Keytool is command line utility which are used to generate certificates.  This certificate management utility helps to create pair of key's like private and public key to help communication between server and client through secure channel.

This command line utility can be access from following path JAVA_HOME/bin/ folder.

To run this keytool utility we need to install Java SDK and keep tool.jar and rt.jar in classpath.


Java Mission Control

These days we have seen many Monitoring tool which provide detail visual information about our site or Virtual Machine running in background and their performance rate etc.

Java Mission Control or JMC is new monitoring tool of Sun JDK which got release from JDK 7.

This visual idea was already developed by Jrockit which is also called JRockit Mission Control.

The main idea of this JMC ( Java Mission Control ) is to gather necessary data with lowest possible impact on running process.  When we say lowest possible impact then it is safe to run in Production environment. 


Java Decompiler (Jad) JD-GUI

Jad (Java Decompiler) is a currently unmaintained decompiler for the Java programming language. Jad provides a command-line user interface to extract source code from class files. One of the popular Java Decompiler is JD GUI.


Find Java class or text file in jar files using JarScan

Probably we all face ClassNotFoundException and we want to know where is that following class is missing with in our jars.  You will search hundreds of jar files to find that specific class.  jarscan is helpful tool or utility to look over your required class with in any archive.  jarscan searches recursively all archives in the current directory and all subdirectories for certian entry. 



lsof Command

lsof is a command meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them.

As we all know Linux/Unix considers everything as a files (pipes, sockets, directories, devices etc). One of the reason to use lsof command is when a disk cannot be unmounted as it says the files are being used. With the help of this command we can easily identify the files which are in use.