
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
What is Module System in Java 9?
One of the major changes in the Java 9 feature is Module System. Java 9 has introduced the following features as part of the Jigsaw Project.
- Modular JDK
- Modular Java Source Code
- Modular Run-time Images
- Encapsulate Java Internal APIs
- Java Platform Module System
One of the main motivations of using the Module System is to provide modular JVM that runs on devices with less available memory. The JVM runs with only those modules and APIs required by the application.
Syntax
module Module-Name { requires moduleName; exports packageName; }
The Modular JAR file contains an additional module descriptor. In this module descriptor, the dependencies of other modules have expressed through "requires" statements. The "exports" statements control which packages have access to other modules.
- Related Articles
- What is an unnamed module in Java 9?
- What are the advantages and disadvantages of the Module System in Java 9?
- What are the different module types in Java 9?
- Importance of Module Descriptor in a Module in Java 9?
- What are the characteristics of a module in Java 9?
- What are the benefits of a module in Java 9?
- What are the components in a module-info file in Java 9?
- How to create a module in Java 9?
- What are the different compilation modes of a module in Java 9?
- What is the use of the "requires" clause in a module-info file in Java 9?
- What is the use of the "export" clause in a module-info file in Java 9?
- How can we display all module names in Java 9?
- How can we modify an existing module in Java 9?
- When to use the ServiceLoader class in a module in Java 9?
- What is Java Unicode System?

Advertisements