Viewing contents of JAR file is easy.

Java Code:
jar tf fileName.jar
Two options are used in the jar command:

t means that contents should be shown in a table form
f means that the contents of file whose contents are to be displayed, is specified on command prompt