JDK 17 lib/modules - Runtime JImage File

Q

What is the lib\modules file in JDK 17 installation directory?

✍: FYIcenter

A

lib\modules file in JDK 17 installation directory is the runtime JImage file of all Java language modules and all JDK tool modules.

You can list all modules and classes in lib\modules using the "jimage list" command:

fyicenter$ jimage list /Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home/lib/modules

Module: java.base
    META-INF/services/java.nio.file.spi.FileSystemProvider
    apple/security/AppleProvider$1.class
    apple/security/AppleProvider$ProviderService.class
    apple/security/AppleProvider.class
    apple/security/KeychainStore$CertKeychainItemPair.class
    apple/security/KeychainStore$KeyEntry.class
    apple/security/KeychainStore$LocalAttr.class
    apple/security/KeychainStore$TrustedCertEntry.class
    apple/security/KeychainStore.class
    com/sun/crypto/provider/AESCipher$AES128_CBC_NoPadding.class
    ...
Module: java.compiler
    javax/annotation/processing/AbstractProcessor.class
    javax/annotation/processing/Completion.class
    javax/annotation/processing/Completions$SimpleCompletion.class
    javax/annotation/processing/Completions.class
    javax/annotation/processing/Filer.class
    javax/annotation/processing/FilerException.class
    javax/annotation/processing/Generated.class
    javax/annotation/processing/Messager.class
    javax/annotation/processing/ProcessingEnvironment.class
    ...
Module: java.desktop
    apple/laf/JRSUIConstants$AlignmentHorizontal.class
    apple/laf/JRSUIConstants$AlignmentVertical.class
    apple/laf/JRSUIConstants$Animating.class
    apple/laf/JRSUIConstants$ArrowsOnly.class
    apple/laf/JRSUIConstants$BooleanValue.class
    apple/laf/JRSUIConstants$Direction.class
    apple/laf/JRSUIConstants$DoubleValue.class
    apple/laf/JRSUIConstants$Focused.class
    apple/laf/JRSUIConstants$FrameOnly.class
    apple/laf/JRSUIConstants$Hit.class
    apple/laf/JRSUIConstants$IndicatorOnly.class
    ...
...

 

JDK 17 lib/src.zip - Source Code

JDK 17 jmods/*.jmod - List of JMod Files

JDK 17 JMod/Module Files

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-09-03, 607🔥, 0💬