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

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.

主站蜘蛛池模板: 吉林市| 庆阳市| 白玉县| 哈巴河县| 宣汉县| 阿坝县| 遂溪县| 荃湾区| 龙州县| 曲水县| 凤凰县| 水富县| 东台市| 沂南县| 拜城县| 如皋市| 子长县| 宁河县| 鄂尔多斯市| 河西区| 海盐县| 卓尼县| 屯门区| 万盛区| 潮安县| 尚志市| 西乌珠穆沁旗| 宜兴市| 浪卡子县| 自贡市| 舒城县| 沿河| 磴口县| 阳谷县| 朝阳区| 金山区| 长汀县| 墨脱县| 拜泉县| 千阳县| 陕西省|