Busy Java Developer's Guide to the JDK Tools

ted.neward@newardassociates.com | Blog: http://blogs.newardassociates.com | Github: tedneward | LinkedIn: tedneward

Overview

What are we here to do today?

The Tools of the JDK

A list

The Tools of the JDK

Build tools

The Tools of the JDK

Run/Deploy tools

The Tools of the JDK

Debug tools

The Tools of the JDK

Observe tools

jar

Create an archive for classes and resources, and manipulate or restore individual classes or resources from an archive

jar

Overview

jar

Main Operation Modes

Modifiers

jar

Examples

jar --create --file classes.jar Foo.class Bar.class

Creates classes.jar containing Foo.class and Bar.class

jar -cf classes.jar Foo.class Bar.class

Synonym to the above

jar tvf classes.jar

Verbosely list all contents of classes.jar

jar

JAR preserves directory paths

jar

Manifest file

jar

Common attributes

jar

Multi-release JARs

jar

JARs and Services

jar

JARs and Modules

jcmd

Java Command utility

jcmd

Overview

jcmd

Synopsis

$ jcmd -l

$ jcmd pid|main-class PerfCounter.print

$ jcmd pid|main-class -f filename

$ jcmd pid|main-class command [arguments]

jcmd

Some useful commands

jstack

Java stack-trace generation tool

jstack

Overview

jstack

Options

visualvm

VisualVM: Basic monitoring for Java6

visualvm

VisualVM

visualvm

Starting VisualVM

visualvm

VisualVM tabs

visualvm

Plugins

Summary

What have we done?