Java Tools Tutorials - Herong's Tutorial Examples - v6.23, by Herong Yang
"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
javac - The Java Program Compiler
java - The Java Program Launcher
►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
javadoc - The Java Document Generator
jdeps - The Java Class Dependency Analyzer
jdeprscan - The Java Deprecated API Scanner
jcmd - The JVM Diagnostic Tool
jconsole - Java Monitoring and Management Console
jstat - JVM Statistics Monitoring Tool
jhsdb - The Java HotSpot Debugger
jvisualvm (Java VisualVM) - JVM Visual Tool
javap - The Java Class File Disassembler
keytool - Public Key Certificate Tool
jrunscript - Script Code Shell
native2ascii - Native-to-ASCII Encoding Converter