1 /* 2 * Copyright (c) 2014, 2023, 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.components; 85 exports java.lang.classfile.constantpool; 86 exports java.lang.classfile.instruction; 87 exports java.lang.constant; 88 exports java.lang.foreign; 89 exports java.lang.invoke; 90 exports java.lang.module; 91 exports java.lang.ref; 92 exports java.lang.reflect; 93 exports java.lang.runtime; 94 exports java.math; 95 exports java.net; 96 exports java.net.spi; 97 exports java.nio; 98 exports java.nio.channels; 99 exports java.nio.channels.spi; 100 exports java.nio.charset; 101 exports java.nio.charset.spi; 102 exports java.nio.file; 103 exports java.nio.file.attribute; 104 exports java.nio.file.spi; 105 exports java.security; 106 exports java.security.cert; 107 exports java.security.interfaces; 108 exports java.security.spec; 109 exports java.text; 110 exports java.text.spi; 111 exports java.time; 112 exports java.time.chrono; 113 exports java.time.format; 114 exports java.time.temporal; 115 exports java.time.zone; 116 exports java.util; 117 exports java.util.concurrent; 118 exports java.util.concurrent.atomic; 119 exports java.util.concurrent.locks; 120 exports java.util.function; 121 exports java.util.jar; 122 exports java.util.random; 123 exports java.util.regex; 124 exports java.util.spi; 125 exports java.util.stream; 126 exports java.util.zip; 127 exports javax.crypto; 128 exports javax.crypto.interfaces; 129 exports javax.crypto.spec; 130 exports javax.net; 131 exports javax.net.ssl; 132 exports javax.security.auth; 133 exports javax.security.auth.callback; 134 exports javax.security.auth.login; 135 exports javax.security.auth.spi; 136 exports javax.security.auth.x500; 137 exports javax.security.cert; 138 139 140 // additional qualified exports may be inserted at build time 141 // see make/gensrc/GenModuleInfo.gmk 142 143 exports com.sun.crypto.provider to 144 jdk.crypto.cryptoki; 145 exports sun.invoke.util to 146 jdk.compiler; 147 exports com.sun.security.ntlm to 148 java.security.sasl; 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.naming, 169 java.rmi, 170 jdk.charsets, 171 jdk.jartool, 172 jdk.jlink, 173 jdk.jfr, 174 jdk.net, 175 jdk.sctp, 176 jdk.crypto.cryptoki; 177 exports jdk.internal.foreign to 178 jdk.incubator.vector; 179 exports jdk.internal.event to 180 jdk.jfr; 181 exports jdk.internal.io to 182 jdk.internal.le, 183 jdk.jshell; 184 exports jdk.internal.jimage to 185 jdk.jlink; 186 exports jdk.internal.jimage.decompressor to 187 jdk.jlink; 188 exports jdk.internal.loader to 189 java.instrument, 190 java.logging, 191 java.naming; 192 exports jdk.internal.jmod to 193 jdk.compiler, 194 jdk.jlink; 195 exports jdk.internal.logger to 196 java.logging; 197 exports jdk.internal.org.objectweb.asm to 198 jdk.jfr; 199 exports jdk.internal.org.objectweb.asm.tree to 200 jdk.jfr; 201 exports jdk.internal.org.objectweb.asm.util to 202 jdk.jfr; 203 exports jdk.internal.org.objectweb.asm.commons to 204 jdk.jfr; 205 exports jdk.internal.org.xml.sax to 206 jdk.jfr; 207 exports jdk.internal.org.xml.sax.helpers to 208 jdk.jfr; 209 exports jdk.internal.misc to 210 java.desktop, 211 java.logging, 212 java.management, 213 java.naming, 214 java.net.http, 215 java.rmi, 216 java.security.jgss, 217 jdk.attach, 218 jdk.charsets, 219 jdk.compiler, 220 jdk.crypto.cryptoki, 221 jdk.incubator.vector, 222 jdk.jfr, 223 jdk.jshell, 224 jdk.nio.mapmode, 225 jdk.unsupported, 226 jdk.internal.vm.ci; 227 exports jdk.internal.module to 228 java.instrument, 229 java.management.rmi, 230 jdk.jartool, 231 jdk.compiler, 232 jdk.jfr, 233 jdk.jlink, 234 jdk.jpackage; 235 exports jdk.internal.perf to 236 java.management, 237 jdk.management.agent, 238 jdk.internal.jvmstat; 239 exports jdk.internal.platform to 240 jdk.management, 241 jdk.jfr; 242 exports jdk.internal.ref to 243 java.desktop, 244 java.net.http, 245 jdk.naming.dns; 246 exports jdk.internal.reflect to 247 java.logging, 248 java.sql, 249 java.sql.rowset, 250 jdk.dynalink, 251 jdk.internal.vm.ci, 252 jdk.unsupported; 253 exports jdk.internal.vm to 254 java.management, 255 jdk.internal.jvmstat, 256 jdk.management, 257 jdk.management.agent, 258 jdk.internal.vm.ci; 259 exports jdk.internal.vm.annotation to 260 java.instrument, 261 jdk.internal.vm.ci, 262 jdk.incubator.vector, 263 jdk.jfr, 264 jdk.unsupported; 265 exports jdk.internal.vm.vector to 266 jdk.incubator.vector; 267 exports jdk.internal.util.xml to 268 jdk.jfr; 269 exports jdk.internal.util.xml.impl to 270 jdk.jfr; 271 exports jdk.internal.util.random to 272 jdk.random; 273 exports jdk.internal.util to 274 java.desktop, 275 java.prefs, 276 java.security.jgss, 277 java.smartcardio, 278 jdk.charsets, 279 jdk.internal.vm.ci, 280 jdk.jlink, 281 jdk.jpackage, 282 jdk.net; 283 exports sun.net to 284 java.net.http, 285 jdk.naming.dns; 286 exports sun.net.ext to 287 jdk.net; 288 exports sun.net.dns to 289 java.security.jgss, 290 jdk.naming.dns; 291 exports sun.net.util to 292 java.desktop, 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.datatransfer, 317 java.management, 318 java.management.rmi, 319 java.rmi, 320 java.sql.rowset; 321 exports sun.security.action to 322 java.desktop, 323 java.security.jgss; 324 exports sun.security.internal.interfaces to 325 jdk.crypto.cryptoki; 326 exports sun.security.internal.spec to 327 jdk.crypto.cryptoki; 328 exports sun.security.jca to 329 java.smartcardio, 330 jdk.crypto.cryptoki, 331 jdk.naming.dns; 332 exports sun.security.pkcs to 333 jdk.jartool; 334 exports sun.security.provider to 335 java.rmi, 336 java.security.jgss, 337 jdk.crypto.cryptoki, 338 jdk.security.auth; 339 exports sun.security.provider.certpath to 340 java.naming, 341 jdk.jartool; 342 exports sun.security.rsa to 343 jdk.crypto.cryptoki; 344 exports sun.security.timestamp to 345 jdk.jartool; 346 exports sun.security.tools to 347 jdk.jartool; 348 exports sun.security.util to 349 java.desktop, 350 java.naming, 351 java.rmi, 352 java.security.jgss, 353 java.security.sasl, 354 java.smartcardio, 355 java.xml.crypto, 356 jdk.crypto.cryptoki, 357 jdk.jartool, 358 jdk.security.auth, 359 jdk.security.jgss; 360 exports sun.security.x509 to 361 jdk.crypto.cryptoki, 362 jdk.jartool; 363 exports sun.security.validator to 364 jdk.jartool; 365 exports sun.util.cldr to 366 jdk.jlink; 367 exports sun.util.locale.provider to 368 java.desktop, 369 jdk.jlink, 370 jdk.localedata; 371 exports sun.util.logging to 372 java.desktop, 373 java.logging, 374 java.prefs; 375 exports sun.util.resources to 376 jdk.localedata; 377 378 // the service types defined by the APIs in this module 379 380 uses java.lang.System.LoggerFinder; 381 uses java.net.ContentHandlerFactory; 382 uses java.net.spi.InetAddressResolverProvider; 383 uses java.net.spi.URLStreamHandlerProvider; 384 uses java.nio.channels.spi.AsynchronousChannelProvider; 385 uses java.nio.channels.spi.SelectorProvider; 386 uses java.nio.charset.spi.CharsetProvider; 387 uses java.nio.file.spi.FileSystemProvider; 388 uses java.nio.file.spi.FileTypeDetector; 389 uses java.security.Provider; 390 uses java.text.spi.BreakIteratorProvider; 391 uses java.text.spi.CollatorProvider; 392 uses java.text.spi.DateFormatProvider; 393 uses java.text.spi.DateFormatSymbolsProvider; 394 uses java.text.spi.DecimalFormatSymbolsProvider; 395 uses java.text.spi.NumberFormatProvider; 396 uses java.time.chrono.AbstractChronology; 397 uses java.time.chrono.Chronology; 398 uses java.time.zone.ZoneRulesProvider; 399 uses java.util.random.RandomGenerator; 400 uses java.util.spi.CalendarDataProvider; 401 uses java.util.spi.CalendarNameProvider; 402 uses java.util.spi.CurrencyNameProvider; 403 uses java.util.spi.LocaleNameProvider; 404 uses java.util.spi.ResourceBundleControlProvider; 405 uses java.util.spi.ResourceBundleProvider; 406 uses java.util.spi.TimeZoneNameProvider; 407 uses java.util.spi.ToolProvider; 408 uses javax.security.auth.spi.LoginModule; 409 410 // JDK-internal service types 411 412 uses jdk.internal.io.JdkConsoleProvider; 413 uses jdk.internal.logger.DefaultLoggerFinder; 414 uses sun.text.spi.JavaTimeDateTimePatternProvider; 415 uses sun.util.spi.CalendarProvider; 416 uses sun.util.locale.provider.LocaleDataMetaInfo; 417 uses sun.util.resources.LocaleData.CommonResourceBundleProvider; 418 uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider; 419 420 // Built-in service providers that are located via ServiceLoader 421 422 provides java.nio.file.spi.FileSystemProvider with 423 jdk.internal.jrtfs.JrtFileSystemProvider; 424 425 provides java.util.random.RandomGenerator with 426 java.security.SecureRandom, 427 java.util.Random, 428 java.util.SplittableRandom; 429 430 }