1 /*
  2  * Copyright (c) 2014, 2026, 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.format.DateTimeFormatterPatternProvider
 64  * @uses java.time.zone.ZoneRulesProvider
 65  * @uses java.util.spi.CalendarDataProvider
 66  * @uses java.util.spi.CalendarNameProvider
 67  * @uses java.util.spi.CurrencyNameProvider
 68  * @uses java.util.spi.LocaleNameProvider
 69  * @uses java.util.spi.ResourceBundleControlProvider
 70  * @uses java.util.spi.ResourceBundleProvider
 71  * @uses java.util.spi.TimeZoneNameProvider
 72  * @uses java.util.spi.ToolProvider
 73  * @uses javax.security.auth.spi.LoginModule
 74  *
 75  * @moduleGraph
 76  * @since 9
 77  */
 78 module java.base {
 79 
 80     exports java.io;
 81     exports java.lang;
 82     exports java.lang.annotation;
 83     exports java.lang.classfile;
 84     exports java.lang.classfile.attribute;
 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     // additional qualified exports may be inserted at build time
140     // see make/gensrc/GenModuleInfo.gmk
141 
142     exports com.sun.crypto.provider to
143         jdk.crypto.cryptoki;
144     exports sun.invoke.util to
145         jdk.compiler;
146     exports com.sun.security.ntlm to
147         java.security.sasl;
148     exports jdk.internal to
149         jdk.incubator.vector;
150     // Note: all modules in the exported list participate in preview features,
151     // normal or reflective.  They do not need to be compiled with "--enable-preview"
152     // to use preview features and do not need to suppress "preview" warnings.
153     // It is recommended for any modules that do participate that their
154     // module declaration be annotated with jdk.internal.javac.ParticipatesInPreview.
155     exports jdk.internal.javac to
156         java.compiler,
157         jdk.compiler,
158         jdk.incubator.code;
159     exports jdk.internal.access to
160         java.desktop,
161         java.logging,
162         java.management,
163         java.rmi,
164         jdk.charsets,
165         jdk.jartool,
166         jdk.jlink,
167         jdk.jfr,
168         jdk.management,
169         jdk.net,
170         jdk.sctp,
171         jdk.crypto.cryptoki,
172         jdk.incubator.code;
173     exports jdk.internal.access.code to
174         jdk.compiler;
175     exports jdk.internal.classfile.components to
176         jdk.jfr;
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.net.quic to
198         java.net.http;
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     exports jdk.internal.module to
221         java.instrument,
222         java.management.rmi,
223         jdk.jartool,
224         jdk.compiler,
225         jdk.jfr,
226         jdk.jlink,
227         jdk.jpackage;
228     exports jdk.internal.perf to
229         java.management,
230         jdk.management.agent,
231         jdk.internal.jvmstat;
232     exports jdk.internal.platform to
233         jdk.management,
234         jdk.jfr;
235     exports jdk.internal.ref to
236         java.desktop,
237         java.net.http,
238         jdk.naming.dns;
239     exports jdk.internal.reflect to
240         java.logging,
241         java.sql,
242         java.sql.rowset,
243         jdk.dynalink,
244         jdk.unsupported;
245     exports jdk.internal.vm to
246         java.management,
247         jdk.internal.jvmstat,
248         jdk.management,
249         jdk.management.agent,
250         jdk.jfr;
251     exports jdk.internal.vm.annotation to
252         java.instrument,
253         jdk.incubator.vector,
254         jdk.jfr,
255         jdk.unsupported;
256     exports jdk.internal.vm.vector to
257         jdk.incubator.vector;
258     exports jdk.internal.util.xml to
259         jdk.jfr;
260     exports jdk.internal.util.xml.impl to
261         jdk.jfr;
262     exports jdk.internal.util to
263         java.desktop,
264         java.prefs,
265         java.security.jgss,
266         java.smartcardio,
267         java.naming,
268         java.rmi,
269         java.net.http,
270         jdk.charsets,
271         jdk.incubator.vector,
272         jdk.httpserver,
273         jdk.jlink,
274         jdk.jpackage,
275         jdk.net,
276         jdk.security.auth;
277     exports sun.net to
278         java.net.http,
279         jdk.naming.dns;
280     exports sun.net.ext to
281         jdk.net;
282     exports sun.net.dns to
283         java.security.jgss,
284         jdk.naming.dns;
285     exports sun.net.util to
286         java.net.http,
287         jdk.jconsole,
288         jdk.sctp;
289     exports sun.net.www to
290         java.net.http,
291         jdk.jartool;
292     exports sun.net.www.protocol.http to
293         java.security.jgss;
294     exports sun.nio.ch to
295         java.management,
296         jdk.crypto.cryptoki,
297         jdk.net,
298         jdk.sctp;
299     exports sun.nio.cs to
300         jdk.charsets;
301     exports sun.nio.fs to
302         jdk.net;
303     exports sun.reflect.annotation to
304         jdk.compiler;
305     exports sun.reflect.generics.reflectiveObjects to
306         java.desktop,
307         jdk.incubator.code;
308     exports sun.reflect.misc to
309         java.desktop,
310         java.management;
311     exports sun.security.internal.interfaces to
312         jdk.crypto.cryptoki;
313     exports sun.security.internal.spec to
314         jdk.crypto.cryptoki;
315     exports sun.security.jca to
316         java.security.sasl,
317         java.smartcardio,
318         jdk.crypto.cryptoki,
319         jdk.naming.dns;
320     exports sun.security.pkcs to
321         jdk.jartool;
322     exports sun.security.provider to
323         java.security.jgss,
324         jdk.crypto.cryptoki,
325         jdk.security.auth;
326     exports sun.security.provider.certpath to
327         java.naming,
328         jdk.jartool;
329     exports sun.security.rsa to
330         jdk.crypto.cryptoki;
331     exports sun.security.timestamp to
332         jdk.jartool;
333     exports sun.security.tools to
334         jdk.jartool;
335     exports sun.security.util to
336         java.naming,
337         java.security.jgss,
338         java.security.sasl,
339         java.smartcardio,
340         java.xml.crypto,
341         jdk.crypto.cryptoki,
342         jdk.jartool,
343         jdk.security.auth,
344         jdk.security.jgss;
345     exports sun.security.x509 to
346         jdk.crypto.cryptoki,
347         jdk.jartool;
348     exports sun.security.validator to
349         jdk.jartool;
350     exports sun.util.cldr to
351         jdk.jlink;
352     exports sun.util.locale.provider to
353         java.desktop,
354         jdk.jlink,
355         jdk.localedata;
356     exports sun.util.logging to
357         java.desktop,
358         java.logging,
359         java.prefs;
360     exports sun.util.resources to
361         jdk.localedata;
362 
363     // the service types defined by the APIs in this module
364 
365     uses java.lang.System.LoggerFinder;
366     uses java.net.ContentHandlerFactory;
367     uses java.net.spi.InetAddressResolverProvider;
368     uses java.net.spi.URLStreamHandlerProvider;
369     uses java.nio.channels.spi.AsynchronousChannelProvider;
370     uses java.nio.channels.spi.SelectorProvider;
371     uses java.nio.charset.spi.CharsetProvider;
372     uses java.nio.file.spi.FileSystemProvider;
373     uses java.nio.file.spi.FileTypeDetector;
374     uses java.security.Provider;
375     uses java.text.spi.BreakIteratorProvider;
376     uses java.text.spi.CollatorProvider;
377     uses java.text.spi.DateFormatProvider;
378     uses java.text.spi.DateFormatSymbolsProvider;
379     uses java.text.spi.DecimalFormatSymbolsProvider;
380     uses java.text.spi.NumberFormatProvider;
381     uses java.time.chrono.AbstractChronology;
382     uses java.time.chrono.Chronology;
383     uses java.time.format.DateTimeFormatterPatternProvider;
384     uses java.time.zone.ZoneRulesProvider;
385     uses java.util.spi.CalendarDataProvider;
386     uses java.util.spi.CalendarNameProvider;
387     uses java.util.spi.CurrencyNameProvider;
388     uses java.util.spi.LocaleNameProvider;
389     uses java.util.spi.ResourceBundleControlProvider;
390     uses java.util.spi.ResourceBundleProvider;
391     uses java.util.spi.TimeZoneNameProvider;
392     uses java.util.spi.ToolProvider;
393     uses javax.security.auth.spi.LoginModule;
394 
395     // JDK-internal service types
396 
397     uses jdk.internal.io.JdkConsoleProvider;
398     uses jdk.internal.logger.DefaultLoggerFinder;
399     uses sun.util.spi.CalendarProvider;
400     uses sun.util.locale.provider.LocaleDataMetaInfo;
401     uses sun.util.resources.LocaleData.LocaleDataResourceBundleProvider;
402 
403     // Built-in service providers that are located via ServiceLoader
404 
405     provides java.nio.file.spi.FileSystemProvider with
406         jdk.internal.jrtfs.JrtFileSystemProvider;
407 
408 }