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

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.

主站蜘蛛池模板: 洪泽县| 延边| 襄城县| 藁城市| 吉林市| 炎陵县| 苍山县| 罗定市| 衡阳县| 莆田市| 石楼县| 黎城县| 东辽县| 莫力| 丽江市| 凌海市| 桃园县| 屏南县| 特克斯县| 辽宁省| 娱乐| 喜德县| 高唐县| 阜阳市| 麟游县| 乐陵市| 西盟| 大庆市| 大渡口区| 长泰县| 石渠县| 平泉县| 元阳县| 华池县| 阳高县| 尉氏县| 来凤县| 四会市| 图木舒克市| 巴林右旗| 富民县|