文件名称:Java APIs, Extensions and Libraries-Apress(2018).pdf
文件大小:9.64MB
文件格式:PDF
更新时间:2021-04-28 01:55:50
Java
Java APIs, Extensions and Libraries_With JavaFX, JDBC, jmod, jlink, Networking, and the Process API-Apress(2018).pdf I am pleased to present the second edition of the Java APIs, Extensions, and Libraries book. It is the third book in the three-volume series. It was not possible to include all JDK9 changes in the one volume. I have included JDK9-specific changes at appropriate places in the three volumes, including this one. If you are interested in learning only JDK9-specific topics, I suggest that you read my Java 9 Revealed book (www.apress.com/9781484225912), which contains only JDK9-specific topics. There are several changes in this edition and they are as follows. I dropped the chapter on applets, which was part of the first edition. The Applet API in JDK9 has been deprecated and all modern browsers either have discontinued or will discontinue the support for the Java plug-in, which is needed to run applets. I consider the Applet API dead for any new development. This was the reason I dropped it in this edition. I added the following three chapters to this edition: Process API (Chapter 10), Packaging Modules (Chapter 11), and Custom Runtime Images (Chapter 11). I felt that this book was missing a chapter on the Process API. JDK9 added several enhancements to the Process API. I thought that a chapter on the Process API would be a good addition to this book. I added Chapter 10 to cover the Process API including enhancements to the Process API in JDK9. Java applications were packaged in JARs before JDK9. JDK9 has added several enhancements to the JAR format. JDK9 added a new type of JAR called the multi-release JAR, which can package code for a library for multiple JDK releases. You can also package modules in JMOD format that can be used at compile-time and link time. Chapter 11 covers the enhancements to the JAR format and the new JMOD format. This chapter also covers how to use the jmod tool to work with JMOD files. JDK9 added a new phase between compile-time and runtime, which is called the linking phase (or link time). You can use the jlink tool, which was introduced in JDK9, to link application modules and JDK modules to their dependencies to create a custom runtime image. The custom runtime image will contain only these modules that are needed by your application, not the entire Java runtime modules—thus reducing the size of the runtime image. Chapter 12 covers how to create custom runtime images using the jlink tool. Apart from these changes, I updated all the chapters from the first edition. I edited the contents to make them flow better, changed or added new examples, and updated the contents to include JDK9-specific features. It is my sincere hope that this edition of the book will help you learn Java better.