Book Image

Java 9 Programming By Example

By : Peter Verhas
Book Image

Java 9 Programming By Example

By: Peter Verhas

Overview of this book

This book gets you started with essential software development easily and quickly, guiding you through Java’s different facets. By adopting this approach, you can bridge the gap between learning and doing immediately. You will learn the new features of Java 9 quickly and experience a simple and powerful approach to software development. You will be able to use the Java runtime tools, understand the Java environment, and create Java programs. We then cover more simple examples to build your foundation before diving to some complex data structure problems that will solidify your Java 9 skills. With a special focus on modularity and HTTP 2.0, this book will guide you to get employed as a top notch Java developer. By the end of the book, you will have a firm foundation to continue your journey towards becoming a professional Java developer.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Project structure and build tools


The project this time will contain many modules. We will still use Maven in this chapter. We will set up a so-called multi-module project in Maven. In such a project, the directory contains the directories of the modules and pom.xml. There is no source code in this top-level directory. The pom.xml file in this directory serves the following two purposes:

  • It references the modules and can be used to compile, install, and deploy all the modules together
  • It defines parameters for the modules that are the same for all of them

Every pom.xml has a parent and this pom.xml is the parent of the pom.xml files in the module directories. To define the modules, the pom.xml file contains the following lines:

<project> 
... 
    <modules> 
        <module>SortInterface</module> 
        <module>bubble</module> 
        <module>quick</module> 
    </modules> 
</project>

These are the names of the modules. These names...