1 /* 2 * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /** 27 * Defines the foundational APIs of the Java SE Platform. 28 * 29 * <dl class="notes"> 30 * <dt>Providers:</dt> 31 * <dd> The JDK implementation of this module provides an implementation of 32 * the {@index jrt jrt} {@linkplain java.nio.file.spi.FileSystemProvider 33 * file system provider} to enumerate and read the class and resource 34 * files in a run-time image. 35 * The jrt file system can be created by calling 36 * {@link java.nio.file.FileSystems#getFileSystem 37 * FileSystems.getFileSystem(URI.create("jrt:/"))}. 38 * </dd> 39 * </dl> 40 * 41 * @toolGuide java java launcher 42 * @toolGuide keytool 43 * 44 * @provides java.nio.file.spi.FileSystemProvider 45 * 46 * @uses java.lang.System.LoggerFinder 47 * @uses java.net.ContentHandlerFactory 48 * @uses java.net.spi.URLStreamHandlerProvider 49 * @uses java.nio.channels.spi.AsynchronousChannelProvider 50 * @uses java.nio.channels.spi.SelectorProvider 51 * @uses java.nio.charset.spi.CharsetProvider 52 * @uses java.nio.file.spi.FileSystemProvider 53 * @uses java.nio.file.spi.FileTypeDetector 54 * @uses java.security.Provider 55 * @uses java.text.spi.BreakIteratorProvider 56 * @uses java.text.spi.CollatorProvider 57 * @uses java.text.spi.DateFormatProvider 58 * @uses java.text.spi.DateFormatSymbolsProvider 59 * @uses java.text.spi.DecimalFormatSymbolsProvider 60 * @uses java.text.spi.NumberFormatProvider 61 * @uses java.time.chrono.AbstractChronology 62 * @uses java.time.chrono.Chronology 63 * @uses java.time.zone.ZoneRulesProvider 64 * @uses java.util.spi.CalendarDataProvider 65 * @uses java.util.spi.CalendarNameProvider 66 * @uses java.util.spi.CurrencyNameProvider 67 * @uses java.util.spi.LocaleNameProvider 68 * @uses java.util.spi.ResourceBundleControlProvider 69 * @uses java.util.spi.ResourceBundleProvider 70 * @uses java.util.spi.TimeZoneNameProvider 71 * @uses java.util.spi.ToolProvider 72 * @uses javax.security.auth.spi.LoginModule 73 * 74 * @moduleGraph 75 * @since 9 76 */ 77 module java.base { 78 79 exports java.io; 80 exports java.lang; 81 exports java.lang.annotation; 82 exports java.lang.classfile; 83 exports java.lang.classfile.attribute; 84 exports java.lang.classfile.constantpool; 85 exports java.lang.classfile.instruction; 86 exports java.lang.constant; 87 exports java.lang.foreign; 88 exports java.lang.invoke; 89 exports java.lang.module; 90 exports java.lang.ref; 91 exports java.lang.reflect; 92 exports java.lang.runtime; 93 exports java.math; 94 exports java.net; 95 exports java.net.spi; 96 exports java.nio; 97 exports java.nio.channels; 98 exports java.nio.channels.spi; 99 exports java.nio.charset; 100 exports java.nio.charset.spi; 101 exports java.nio.file; 102 exports java.nio.file.attribute; 103 exports java.nio.file.spi; 104 exports java.security; 105 exports java.security.cert; 106 exports java.security.interfaces; 107 exports java.security.spec; 108 exports java.text; 109 exports java.text.spi; 110 exports java.time; 111 exports java.time.chrono; 112 exports java.time.format; 113 exports java.time.temporal; 114 exports java.time.zone; 115 exports java.util; 116 exports java.util.concurrent; 117 exports java.util.concurrent.atomic; 118 exports java.util.concurrent.locks; 119 exports java.util.function; 120 exports java.util.jar; 121 exports java.util.random; 122 exports java.util.regex; 123 exports java.util.spi; 124 exports java.util.stream; 125 exports java.util.zip; 126 exports javax.crypto; 127 exports javax.crypto.interfaces; 128 exports javax.crypto.spec; 129 exports javax.net; 130 exports javax.net.ssl; 131 exports javax.security.auth; 132 exports javax.security.auth.callback; 133 exports javax.security.auth.login; 134 exports javax.security.auth.spi; 135 exports javax.security.auth.x500; 136 exports javax.security.cert; 137 138 // additional qualified exports may be inserted at build time 139 // see make/gensrc/GenModuleInfo.gmk 140 141 exports com.sun.crypto.provider to 142 jdk.crypto.cryptoki; 143 exports sun.invoke.util to 144 jdk.compiler; 145 exports com.sun.security.ntlm to 146 java.security.sasl; 147 exports jdk.internal to 148 jdk.incubator.vector; 149 // Note: all modules in the exported list participate in preview features 150 // and therefore if they use preview features they do not need to be 151 // compiled with "--enable-preview". 152 // It is recommended for any modules that do participate that their 153 // module declaration be annotated with jdk.internal.javac.ParticipatesInPreview 154 exports jdk.internal.javac to 155 java.compiler, 156 java.desktop, // for ScopedValue 157 jdk.compiler, 158 jdk.incubator.vector, // participates in preview features 159 jdk.jartool, // participates in preview features 160 jdk.jdeps, // participates in preview features 161 jdk.jfr, // participates in preview features 162 jdk.jlink, // participates in preview features 163 jdk.jshell; // participates in preview features 164 exports jdk.internal.access to 165 java.desktop, 166 java.logging, 167 java.management, 168 java.rmi, 169 jdk.charsets, 170 jdk.jartool, 171 jdk.jlink, 172 jdk.jfr, 173 jdk.management, 174 jdk.net, 175 jdk.sctp, 176 jdk.crypto.cryptoki; 177 exports jdk.internal.classfile.components to 178 jdk.jfr; 179 exports jdk.internal.foreign to 180 jdk.incubator.vector; 181 exports jdk.internal.event to 182 jdk.jfr; 183 exports jdk.internal.io to 184 jdk.internal.le, 185 jdk.jshell; 186 exports jdk.internal.jimage to 187 jdk.jlink; 188 exports jdk.internal.jimage.decompressor to 189 jdk.jlink; 190 exports jdk.internal.loader to 191 java.instrument, 192 java.logging, 193 java.naming; 194 exports jdk.internal.jmod to 195 jdk.compiler, 196 jdk.jlink; 197 exports jdk.internal.logger to 198 java.logging; 199 exports jdk.internal.org.xml.sax to 200 jdk.jfr; 201 exports jdk.internal.org.xml.sax.helpers to 202 jdk.jfr; 203 exports jdk.internal.misc to 204 java.desktop, 205 java.logging, 206 java.management, 207 java.naming, 208 java.net.http, 209 java.rmi, 210 java.security.jgss, 211 jdk.attach, 212 jdk.charsets, 213 jdk.compiler, 214 jdk.crypto.cryptoki, 215 jdk.incubator.vector, 216 jdk.jfr, 217 jdk.jshell, 218 jdk.nio.mapmode, 219 jdk.unsupported, 220 jdk.internal.vm.ci, 221 jdk.graal.compiler; 222 exports jdk.internal.module to 223 java.instrument, 224 java.management.rmi, 225 jdk.jartool, 226 jdk.compiler, 227 jdk.jfr, 228 jdk.jlink, 229 jdk.jpackage; 230 exports jdk.internal.perf to 231 java.management, 232 jdk.management.agent, 233 jdk.internal.jvmstat; 234 exports jdk.internal.platform to 235 jdk.management, 236 jdk.jfr; 237 exports jdk.internal.ref to 238 java.desktop, 239 java.net.http, 240 jdk.naming.dns; 241 exports jdk.internal.reflect to 242 java.logging, 243 java.sql, 244 java.sql.rowset, 245 jdk.dynalink, 246 jdk.internal.vm.ci, 247 jdk.unsupported; 248 exports jdk.internal.vm to 249 java.management, 250 jdk.internal.jvmstat, 251 jdk.management, 252 jdk.management.agent, 253 jdk.internal.vm.ci, 254 jdk.jfr; 255 exports jdk.internal.vm.annotation to 256 java.instrument, 257 jdk.internal.vm.ci, 258 jdk.incubator.vector, 259 jdk.jfr, 260 jdk.unsupported; 261 exports jdk.internal.vm.vector to 262 jdk.incubator.vector; 263 exports jdk.internal.util.xml to 264 jdk.jfr; 265 exports jdk.internal.util.xml.impl to 266 jdk.jfr; 267 exports jdk.internal.value to // Needed by Unsafe 268 jdk.unsupported; 269 exports jdk.internal.util to 270 java.desktop, 271 java.prefs, 272 java.security.jgss, 273 java.smartcardio, 274 java.naming, 275 java.rmi, 276 java.net.http, 277 jdk.charsets, 278 jdk.incubator.vector, 279 jdk.internal.vm.ci, 280 jdk.httpserver, 281 jdk.jlink, 282 jdk.jpackage, 283 jdk.net; 284 exports sun.net to 285 java.net.http, 286 jdk.naming.dns; 287 exports sun.net.ext to 288 jdk.net; 289 exports sun.net.dns to 290 java.security.jgss, 291 jdk.naming.dns; 292 exports sun.net.util to 293 java.net.http, 294 jdk.jconsole, 295 jdk.sctp; 296 exports sun.net.www to 297 java.net.http, 298 jdk.jartool; 299 exports sun.net.www.protocol.http to 300 java.security.jgss; 301 exports sun.nio.ch to 302 java.management, 303 jdk.crypto.cryptoki, 304 jdk.net, 305 jdk.sctp; 306 exports sun.nio.cs to 307 jdk.charsets; 308 exports sun.nio.fs to 309 jdk.net; 310 exports sun.reflect.annotation to 311 jdk.compiler; 312 exports sun.reflect.generics.reflectiveObjects to 313 java.desktop; 314 exports sun.reflect.misc to 315 java.desktop, 316 java.management; 317 exports sun.security.internal.interfaces to 318 jdk.crypto.cryptoki; 319 exports sun.security.internal.spec to 320 jdk.crypto.cryptoki; 321 exports sun.security.jca to 322 java.security.sasl, 323 java.smartcardio, 324 jdk.crypto.cryptoki, 325 jdk.naming.dns; 326 exports sun.security.pkcs to 327 jdk.jartool; 328 exports sun.security.provider to 329 java.security.jgss, 330 jdk.crypto.cryptoki, 331 jdk.security.auth; 332 exports sun.security.provider.certpath to 333 java.naming, 334 jdk.jartool; 335 exports sun.security.rsa to 336 jdk.crypto.cryptoki; 337 exports sun.security.timestamp to 338 jdk.jartool; 339 exports sun.security.tools to 340 jdk.jartool; 341 exports sun.security.util to 342 java.naming, 343 java.security.jgss, 344 java.security.sasl, 345 java.smartcardio, 346 java.xml.crypto, 347 jdk.crypto.cryptoki, 348 jdk.jartool, 349 jdk.security.auth, 350 jdk.security.jgss; 351 exports sun.security.x509 to 352 jdk.crypto.cryptoki, 353 jdk.jartool; 354 exports sun.security.validator to 355 jdk.jartool; 356 exports sun.util.cldr to 357 jdk.jlink; 358 exports sun.util.locale.provider to 359 java.desktop, 360 jdk.jlink, 361 jdk.localedata; 362 exports sun.util.logging to 363 java.desktop, 364 java.logging, 365 java.prefs; 366 exports sun.util.resources to 367 jdk.localedata; 368 369 // the service types defined by the APIs in this module 370 371 uses java.lang.System.LoggerFinder; 372 uses java.net.ContentHandlerFactory; 373 uses java.net.spi.InetAddressResolverProvider; 374 uses java.net.spi.URLStreamHandlerProvider; 375 uses java.nio.channels.spi.AsynchronousChannelProvider; 376 uses java.nio.channels.spi.SelectorProvider; 377 uses java.nio.charset.spi.CharsetProvider; 378 uses java.nio.file.spi.FileSystemProvider; 379 uses java.nio.file.spi.FileTypeDetector; 380 uses java.security.Provider; 381 uses java.text.spi.BreakIteratorProvider; 382 uses java.text.spi.CollatorProvider; 383 uses java.text.spi.DateFormatProvider; 384 uses java.text.spi.DateFormatSymbolsProvider; 385 uses java.text.spi.DecimalFormatSymbolsProvider; 386 uses java.text.spi.NumberFormatProvider; 387 uses java.time.chrono.AbstractChronology; 388 uses java.time.chrono.Chronology; 389 uses java.time.zone.ZoneRulesProvider; 390 uses java.util.spi.CalendarDataProvider; 391 uses java.util.spi.CalendarNameProvider; 392 uses java.util.spi.CurrencyNameProvider; 393 uses java.util.spi.LocaleNameProvider; 394 uses java.util.spi.ResourceBundleControlProvider; 395 uses java.util.spi.ResourceBundleProvider; 396 uses java.util.spi.TimeZoneNameProvider; 397 uses java.util.spi.ToolProvider; 398 uses javax.security.auth.spi.LoginModule; 399 400 // JDK-internal service types 401 402 uses jdk.internal.io.JdkConsoleProvider; 403 uses jdk.internal.logger.DefaultLoggerFinder; 404 uses sun.text.spi.JavaTimeDateTimePatternProvider; 405 uses sun.util.spi.CalendarProvider; 406 uses sun.util.locale.provider.LocaleDataMetaInfo; 407 uses sun.util.resources.LocaleData.LocaleDataResourceBundleProvider; 408 409 // Built-in service providers that are located via ServiceLoader 410 411 provides java.nio.file.spi.FileSystemProvider with 412 jdk.internal.jrtfs.JrtFileSystemProvider; 413 414 }