1 /*
  2  * Copyright (c) 2014, 2022, 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.constant;
 83     exports java.lang.foreign;
 84     exports java.lang.invoke;
 85     exports java.lang.module;
 86     exports java.lang.ref;
 87     exports java.lang.reflect;
 88     exports java.lang.runtime;
 89     exports java.math;
 90     exports java.net;
 91     exports java.net.spi;
 92     exports java.nio;
 93     exports java.nio.channels;
 94     exports java.nio.channels.spi;
 95     exports java.nio.charset;
 96     exports java.nio.charset.spi;
 97     exports java.nio.file;
 98     exports java.nio.file.attribute;
 99     exports java.nio.file.spi;
100     exports java.security;
101     exports java.security.cert;
102     exports java.security.interfaces;
103     exports java.security.spec;
104     exports java.text;
105     exports java.text.spi;
106     exports java.time;
107     exports java.time.chrono;
108     exports java.time.format;
109     exports java.time.temporal;
110     exports java.time.zone;
111     exports java.util;
112     exports java.util.concurrent;
113     exports java.util.concurrent.atomic;
114     exports java.util.concurrent.locks;
115     exports java.util.function;
116     exports java.util.jar;
117     exports java.util.random;
118     exports java.util.regex;
119     exports java.util.spi;
120     exports java.util.stream;
121     exports java.util.zip;
122     exports javax.crypto;
123     exports javax.crypto.interfaces;
124     exports javax.crypto.spec;
125     exports javax.net;
126     exports javax.net.ssl;
127     exports javax.security.auth;
128     exports javax.security.auth.callback;
129     exports javax.security.auth.login;
130     exports javax.security.auth.spi;
131     exports javax.security.auth.x500;
132     exports javax.security.cert;
133 
134 
135     // additional qualified exports may be inserted at build time
136     // see make/gensrc/GenModuleInfo.gmk
137 
138     exports com.sun.crypto.provider to
139         jdk.crypto.cryptoki;
140     exports sun.invoke.util to
141         jdk.compiler;
142     exports com.sun.security.ntlm to
143         java.security.sasl;
144     // Note: all modules in the exported list participate in preview  features
145     // and therefore if they use preview features they do not need to be
146     // compiled with "--enable-preview".
147     // It is recommended for any modules that do participate that their
148     // module declaration be annotated with jdk.internal.javac.ParticipatesInPreview
149     exports jdk.internal.javac to
150         java.compiler,
151         java.management, // participates in preview features
152         jdk.compiler,
153         jdk.incubator.concurrent, // participates in preview features
154         jdk.incubator.vector, // participates in preview features
155         jdk.jdi,
156         jdk.jfr,
157         jdk.jshell,
158         jdk.management;
159     exports jdk.internal.access to
160         java.desktop,
161         java.logging,
162         java.management,
163         java.naming,
164         java.rmi,
165         jdk.charsets,
166         jdk.jartool,
167         jdk.jlink,
168         jdk.jfr,
169         jdk.net;
170     exports jdk.internal.foreign to
171         jdk.incubator.vector;
172     exports jdk.internal.event to
173         jdk.jfr;
174     exports jdk.internal.jimage to
175         jdk.jlink;
176     exports jdk.internal.jimage.decompressor to
177         jdk.jlink;
178     exports jdk.internal.loader to
179         java.instrument,
180         java.logging,
181         java.naming;
182     exports jdk.internal.jmod to
183         jdk.compiler,
184         jdk.jlink;
185     exports jdk.internal.logger to
186         java.logging;
187     exports jdk.internal.org.objectweb.asm to
188         jdk.jartool,
189         jdk.jfr,
190         jdk.jlink,
191         jdk.jshell;
192     exports jdk.internal.org.objectweb.asm.tree to
193         jdk.jfr,
194         jdk.jlink;
195     exports jdk.internal.org.objectweb.asm.util to
196         jdk.jfr;
197     exports jdk.internal.org.objectweb.asm.commons to
198         jdk.jfr;
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.concurrent,
216         jdk.incubator.vector,
217         jdk.jfr,
218         jdk.jshell,
219         jdk.nio.mapmode,
220         jdk.unsupported,
221         jdk.internal.vm.ci;
222     exports jdk.internal.module to
223         java.instrument,
224         java.management.rmi,
225         jdk.jartool,
226         jdk.jfr,
227         jdk.jlink,
228         jdk.jpackage;
229     exports jdk.internal.perf to
230         java.management,
231         jdk.management.agent,
232         jdk.internal.jvmstat;
233     exports jdk.internal.platform to
234         jdk.management,
235         jdk.jfr;
236     exports jdk.internal.ref to
237         java.desktop,
238         java.net.http;
239     exports jdk.internal.reflect to
240         java.logging,
241         java.sql,
242         java.sql.rowset,
243         jdk.dynalink,
244         jdk.internal.vm.ci,
245         jdk.unsupported;
246     exports jdk.internal.vm to
247         java.management,
248         jdk.internal.jvmstat,
249         jdk.management,
250         jdk.management.agent;
251     exports jdk.internal.vm.annotation to
252         java.instrument,
253         jdk.internal.vm.ci,
254         jdk.incubator.vector,
255         jdk.jfr,
256         jdk.unsupported;
257     exports jdk.internal.vm.vector to
258         jdk.incubator.vector;
259     exports jdk.internal.util.jar to
260         jdk.jartool;
261     exports jdk.internal.util.xml to
262         jdk.jfr;
263     exports jdk.internal.util.xml.impl to
264         jdk.jfr;
265     exports jdk.internal.util.random to
266         jdk.random;
267     exports sun.net to
268         java.net.http,
269         jdk.naming.dns;
270     exports sun.net.ext to
271         jdk.net;
272     exports sun.net.dns to
273         java.security.jgss,
274         jdk.naming.dns;
275     exports sun.net.util to
276         java.desktop,
277         java.net.http,
278         jdk.jconsole,
279         jdk.sctp;
280     exports sun.net.www to
281         java.net.http,
282         jdk.jartool;
283     exports sun.net.www.protocol.http to
284         java.security.jgss;
285     exports sun.nio.ch to
286         java.management,
287         jdk.crypto.cryptoki,
288         jdk.net,
289         jdk.sctp;
290     exports sun.nio.cs to
291         jdk.charsets;
292     exports sun.nio.fs to
293         jdk.net;
294     exports sun.reflect.annotation to
295         jdk.compiler;
296     exports sun.reflect.generics.reflectiveObjects to
297         java.desktop;
298     exports sun.reflect.misc to
299         java.desktop,
300         java.datatransfer,
301         java.management,
302         java.management.rmi,
303         java.rmi,
304         java.sql.rowset;
305     exports sun.security.action to
306         java.desktop,
307         java.security.jgss,
308         jdk.crypto.ec;
309     exports sun.security.internal.interfaces to
310         jdk.crypto.cryptoki;
311     exports sun.security.internal.spec to
312         jdk.crypto.cryptoki;
313     exports sun.security.jca to
314         java.smartcardio,
315         jdk.crypto.ec,
316         jdk.crypto.cryptoki,
317         jdk.naming.dns;
318     exports sun.security.pkcs to
319         jdk.crypto.ec,
320         jdk.jartool;
321     exports sun.security.provider to
322         java.rmi,
323         java.security.jgss,
324         jdk.crypto.cryptoki,
325         jdk.crypto.ec,
326         jdk.security.auth;
327     exports sun.security.provider.certpath to
328         java.naming,
329         jdk.jartool;
330     exports sun.security.rsa to
331         jdk.crypto.cryptoki;
332     exports sun.security.timestamp to
333         jdk.jartool;
334     exports sun.security.tools to
335         jdk.jartool;
336     exports sun.security.util to
337         java.desktop,
338         java.naming,
339         java.rmi,
340         java.security.jgss,
341         java.security.sasl,
342         java.smartcardio,
343         java.xml.crypto,
344         jdk.crypto.ec,
345         jdk.crypto.cryptoki,
346         jdk.jartool,
347         jdk.security.auth,
348         jdk.security.jgss;
349     exports sun.security.util.math to
350         jdk.crypto.ec;
351     exports sun.security.util.math.intpoly to
352         jdk.crypto.ec;
353     exports sun.security.x509 to
354         jdk.crypto.ec,
355         jdk.crypto.cryptoki,
356         jdk.jartool;
357     exports sun.security.validator to
358         jdk.jartool;
359     exports sun.util.cldr to
360         jdk.jlink;
361     exports sun.util.locale.provider to
362         java.desktop,
363         jdk.jlink,
364         jdk.localedata;
365     exports sun.util.logging to
366         java.desktop,
367         java.logging,
368         java.prefs;
369     exports sun.util.resources to
370         jdk.localedata;
371 
372     // the service types defined by the APIs in this module
373 
374     uses java.lang.System.LoggerFinder;
375     uses java.net.ContentHandlerFactory;
376     uses java.net.spi.InetAddressResolverProvider;
377     uses java.net.spi.URLStreamHandlerProvider;
378     uses java.nio.channels.spi.AsynchronousChannelProvider;
379     uses java.nio.channels.spi.SelectorProvider;
380     uses java.nio.charset.spi.CharsetProvider;
381     uses java.nio.file.spi.FileSystemProvider;
382     uses java.nio.file.spi.FileTypeDetector;
383     uses java.security.Provider;
384     uses java.text.spi.BreakIteratorProvider;
385     uses java.text.spi.CollatorProvider;
386     uses java.text.spi.DateFormatProvider;
387     uses java.text.spi.DateFormatSymbolsProvider;
388     uses java.text.spi.DecimalFormatSymbolsProvider;
389     uses java.text.spi.NumberFormatProvider;
390     uses java.time.chrono.AbstractChronology;
391     uses java.time.chrono.Chronology;
392     uses java.time.zone.ZoneRulesProvider;
393     uses java.util.random.RandomGenerator;
394     uses java.util.spi.CalendarDataProvider;
395     uses java.util.spi.CalendarNameProvider;
396     uses java.util.spi.CurrencyNameProvider;
397     uses java.util.spi.LocaleNameProvider;
398     uses java.util.spi.ResourceBundleControlProvider;
399     uses java.util.spi.ResourceBundleProvider;
400     uses java.util.spi.TimeZoneNameProvider;
401     uses java.util.spi.ToolProvider;
402     uses javax.security.auth.spi.LoginModule;
403 
404     // JDK-internal service types
405 
406     uses jdk.internal.logger.DefaultLoggerFinder;
407     uses sun.text.spi.JavaTimeDateTimePatternProvider;
408     uses sun.util.spi.CalendarProvider;
409     uses sun.util.locale.provider.LocaleDataMetaInfo;
410     uses sun.util.resources.LocaleData.CommonResourceBundleProvider;
411     uses sun.util.resources.LocaleData.SupplementaryResourceBundleProvider;
412 
413     // Built-in service providers that are located via ServiceLoader
414 
415     provides java.nio.file.spi.FileSystemProvider with
416         jdk.internal.jrtfs.JrtFileSystemProvider;
417 
418     provides java.util.random.RandomGenerator with
419         java.security.SecureRandom,
420         java.util.Random,
421         java.util.SplittableRandom;
422 
423 }