源码结构#
看大项目,历史久远的项目的源码,其中之一的麻烦是目录结构繁杂。下面说说 OpenJDK 的目录结构。
https://openjdk.org/guide/
hotspot
cpu - Compiler, Runtime
os - Runtime
os_cpu - Compiler
share
adlc - Compiler
asm - Runtime
c1 - Compiler
cds - Runtime
ci - Compiler
classfile - Runtime
code - Compiler
compiler - Compiler
gc - GC
include - HotSpot
interpreter - Runtime
jfr - JFR
jvmci - Compiler
libadt - Compiler
logging - Runtime
memory - GC, Runtime
metaprogramming - HotSpot
nmt - Runtime
oops - GC, Runtime
opto - Compiler
precompiled - HotSpot
prims - Runtime, Serviceability
runtime - Runtime
sanitizers - Runtime
services - Runtime
utilities - GC, Runtime
java.base
Core Libs should almost always be included but Java Language, HotSpot, Security and/or I18n may also be involved.
[linux]/classes
com/sun/crypto - Security
com/sun/security - Security
crypto - Security
[linux]/internal
access - Core Libs, Security
event - JFR
foreign - Core Libs
icu - Core Libs
io - Core Libs
javac - Java Language (javac)
jimage - Core Libs
jmod - Core Libs
jrtfs - Core Libs
logger - Core Libs
math - Core Libs
module - Core Libs
org/objectweb - Core Libs
org/xml - Core Libs
perf - Runtime
ref - Core Libs, GC
reflect - Core Libs
util/random - Core Libs
util/regex - Core Libs
util/xml - Core Libs
vm - HotSpot
invoke - Core Libs
[unix]/java
launcher - Tools, Core Libs
META-INF/services - Core Libs
reflect - Core Libs
[apple, java, javax, macosx, unix, windows]/security - Security
[unix]/conf
man
[unix]/native
share/data
blockedcertsconverter - Security
cacerts - Security
currency - I18n
lsrdata - I18n
publicsuffixlist - Client Libs
tzdata - I18n
unicodedata - I18n
java.compiler - Java Language (javac)