官术网_书友最值得收藏!

Creating Your First Java Module

In the previous chapter, we took a detailed look at the problems associated with modularizing Java code pre-Java 9, as well as the new module construct in Java 9 and Project Jigsaw. Before we examine how Java modularity solves these problems, you'll need to first understand what a Java module looks like. In this chapter, you'll create your first Java 9 module and learn what it takes to build and execute code in a Java module. Here are the top-level topics you'll be learning in this chapter:

  • Setting up the JDK with Java 9
  • Creating a new Java 9 module
  • Defining a module (using module-info.java)
  • Compiling and executing a module
  • Handling possible errors

You'll be building a sample Java 9 application throughout this book as you learn the different concepts related to modularity. The application you'll build is an address book viewer application that displays some contacts sorted by last name. We'll start simple and enhance this application as we go. When you are done with this chapter, you'll have built your first Java 9 module and learned how to compile and execute it. Let's start by first installing the JDK.

主站蜘蛛池模板: 三穗县| 峨边| 日土县| 抚州市| 明水县| 赤峰市| 汽车| 靖西县| 江门市| 镶黄旗| 噶尔县| 庆安县| 西和县| 慈利县| 铁岭市| 若尔盖县| 临海市| 安陆市| 龙州县| 普安县| 金秀| 余姚市| 巴东县| 伽师县| 大宁县| 卢氏县| 商水县| 五华县| 云霄县| 长顺县| 南汇区| 尚志市| 高密市| 华宁县| 宜昌市| 武夷山市| 长汀县| 二手房| 乐业县| 泰来县| 海口市|