"jimage extract" - Extracting JIMAGE File Entries

This section provides a tutorial example on how to use the 'jimage extract' command to extract JIMAGE file entries.

The next command to learn is the "jimage extract" command, which extract entries out of a given JIMAGE file.

The "jimage extract" command can have two options:

Here is how I extract all java classes that are related to "DSAPrivateKey" from the JIMAGE file of the default JRE of my JDK 10 installation:

herong> jimage extract --include regex:.*DSAPrivateKey.*  \
   --dir .\junk \progra~1\java\jdk-12.0.1\lib\modules

herong> tree /F .\junk
.\JUNK
|---java.base
|   |---java
|   |   |---security
|   |       |---interfaces
|   |       |       DSAPrivateKey.class
|   |       |
|   |       |---spec
|   |               DSAPrivateKeySpec.class
|   |
|   |---sun
|       |---security
|           |---provider
|                   DSAPrivateKey.class
|
|---jdk.crypto.cryptoki
|   |---sun
|       |---security
|           |---pkcs11
|                   P11Key$P11DSAPrivateKey.class
|
|---jdk.deploy
    |---com
        |---sun
            |---deploy
                |---security
                        MozillaJSSDSAPrivateKey.class
                        MSCryptoDSAPrivateKey.class

Cool. I got 6 classes related DSA private key.

Table of Contents

 About This Book

 Java Tools Terminology

 Java Tools Included in JDK

 javac - The Java Program Compiler

 jar - The JAR File Tool

 jlink - The JRE Linker

 jmod - The JMOD File Tool

jimage - The JIMAGE File Tool

 JIMAGE - Java Image File Format

 jimage - JIMAGE File Tool Command

 "jimage info|list" - Listing JIMAGE Entries

"jimage extract" - Extracting JIMAGE File Entries

 Java File Types and Related Tools

 jpackage - Binary Package Builder

 java - The Java Program Launcher

 jdeps - The Java Class Dependency Analyzer

 jdeprscan - The Java Deprecated API Scanner

 jdb - The Java Debugger

 jcmd - The JVM Diagnostic Tool

 jconsole - Java Monitoring and Management Console

 jstat - JVM Statistics Monitoring Tool

 JVM Troubleshooting Tools

 jhsdb - The Java HotSpot Debugger

 jvisualvm (Java VisualVM) - JVM Visual Tool

 jmc - Java Mission Control

 javap - The Java Class File Disassembler

 keytool - Public Key Certificate Tool

 jarsigner - JAR File Signer

 jshell - Java Language Shell

 jrunscript - Script Code Shell

 serialver - serialVersionUID Generator

 native2ascii - Native-to-ASCII Encoding Converter

 Outdated Tutorials

 References

 Full Version in PDF/EPUB