
- 910 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Java 9: Building Robust Modular Applications
About this book
Mastering advanced features of Java and implement them to build amazing projects
Key Features
- Take advantage of Java's new modularity features to write real-world applications that solve a variety of problems
- Explore the major concepts introduced with Java 9, including modular programming, HTTP 2.0, API changes, and more
- Get to grips with tools, techniques and best practices to enhance application development
Book Description
Java 9 and its new features add to the richness of the language; Java is one of the languages most used by developers to build robust software applications. Java 9 comes with a special emphasis on modularity with its integration with Jigsaw. This course is your one-stop guide to mastering the language.
You'll be provided with an overview and explanation of the new features introduced in Java 9 and the importance of the new APIs and enhancements. Some new features of Java 9 are ground-breaking; if you are an experienced programmer, you will be able to make your enterprise applications leaner by learning these new features. You'll be provided with practical guidance in applying your newly acquired knowledge of Java 9 and further information on future developments of the Java platform. This course will improve your productivity, making your applications faster. Next, you'll go on to implement everything you've learned by building 10 cool projects. You will learn to build an email filter that separates spam messages from all your inboxes, a social media aggregator app that will help you efficiently track various feeds, and a microservice for a client/server note application, to name just a few.
By the end of this course, you will be well acquainted with Java 9 features and able to build your own applications and projects.
This Learning Path contains the best content from the following two recently published Packt products:
•Mastering Java 9
•Java 9 Programming Blueprints
What you will learn
- Package Java applications as modules using the Java Platform Module System
- Implement process management in Java using the all-new process handling API
- Integrate your applications with third-party services in the cloud
- Interact with mail servers, using JavaMail to build an application that filters spam messages
- Use JavaFX to build rich GUI-based applications, which are an essential element of application development
- Leverage the possibilities provided by the newly introduced Java shell
- Test your application's effectiveness with the JVM harness
- See how Java 9 provides support for the HTTP 2.0 standard
Who this book is for
This learning path is for Java developers who are looking to move a level up and learn how to build robust applications in the latest version of Java.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
New Tools and Tool Enhancements
- The new HTTP client
- Javadoc and the Doclet API
- mJRE changes
- JavaScript parser
- Multi-release JAR files
- The Java-level JVM compiler interface
- TIFF support
- Platform logging
- XML Catalogs
- Collections
- Platform-specific desktop features
- Enhanced method handling
- Enhanced deprecation
The new HTTP client [JEP-110]
The HTTP client before Java 9
- chunkLength
- fixedContentLength
- fixedContentLengthLong
- HTTP_ACCEPTED
- HTTP_BAD_GATEWAY
- HTTP_BAD_METHOD
- HTTP_BAD_REQUEST
- HTTP_CLIENT_TIMEOUT
- HTTP_CONFLICT
- HTTP_CREATED
- HTTP_ENTITY_TOO_LARGE
- HTTP_FORBIDDEN
- HTTP_GONE
- HTTP_INTERNAL_ERROR
- HTTP_LENGTH_REQUIRED
- HTTP_MOVED_PERM
- HTTP_MOVED_TEMP
- HTTP_MULT_CHOICE
- HTTP_NO_CONTENT
- HTTP_NOT_ACCEPTABLE
- HTTP_NOT_AUTHORITATIVE
- HTTP_NOT_FOUND
- HTTP_NOT_IMPLEMENTED
- HTTP_NOT_MODIFIED
- HTTP_OK
- HTTP_PARTIAL
- HTTP_PAYMENT_REQUIRED
- HTTP_PRECON_FAILED
- HTTP_PROXY_AUTH
- HTTP_REQ_TOO_LONG
- HTTP_RESET
- HTTP_SEE_OTHER
- HTTP_SERVER_ERROR
- HTTP_UNAUTHORIZED
- HTTP_UNAVAIABLE
- HTTP_UNSUPPORTED_TYPE
- HTTP_USE_PROXY
- HTTP_VERSION
- instanceFollowRedirects
- method
- responseCode
- responseMessage
- disconnect()
- getErrorStream()
- getFollowRedirects()
- getHeaderField(int n)
- getHeaderFieldDate(String name, long Default)
- getHeaderFieldKey(int n)
- getInstanceFollowRedirects()
- getPermission()
- getRequestMethod()
- getResponseCode()
- getResponseMessage()
- setChunkedStreamingMode(int chunklen)
- setFixedLengthStreamingMode(int contentLength)
- setFixedlengthStreamingMode(long contentLength)
- setFollowRedirects(boolean set)
- setInstanceFollowRedircts(boolean followRedirects)
- setRequestMethod(String method)
- usingProxy()
- The base URLConnection API had, defunct protocols such as Gopher and FTP increasingly over the years
- The HttpURLConnection API predated HTTP 1.1 and was overly abstract, making it less usable
- The HTTP client was woefully under documented, making the API frustrating and difficult to use
- The client only functioned on one thread at a time
- The API was extremely difficult to maintain due to the above points about it predating HTTP 1.1 and it lacking sufficient documentation
Java 9's new HTTP client
- Ease of use:
- The API was designed to provide up to 90 percent of HTTP-related application requirements.
- The new API is usable, without unnecessary complexity, for the most common use cases.
- A simplistic blocking mode is included.
- The API supports modern Java language features. Lambda expressions, a major new introduction released with Java 8, are an example.
- Core capabilities:
- Supports HTTPS/TLS
- Supports HTTP/2
- Provides visibility on all details related to HTTP protocol requests and responses
- Supports standard/common authentication mechanisms
- Provides headers received event notifications
- Provides response body received event notifications
- Provides error event notifications
- Additional capabilities:
- The new API can be used for WebSocket handshakes
- It performs security checks in concert with the current networking API
- Performance:
- For HTTP/1.1:
- The new API must perform at least as efficiently as the previous API.
- Memory consumption must not exceed that of Apache Ht...
- For HTTP/1.1:
Table of contents
- Title Page - Courses
- Copyright and Credits - Courses
- Packt Upsell - Courses
- Preface
- Mastering Java 9
- The Java 9 Landscape
- Discovering Java 9
- Java 9 Language Enhancements
- Building Modular Applications with Java 9
- Migrating Applications to Java 9
- Experimenting with the Java Shell
- Leveraging the New Default G1 Garbage Collector
- Microbenchmarking Applications with JMH
- Making Use of the ProcessHandle API
- Fine-Grained Stack Tracing
- New Tools and Tool Enhancements
- Concurrency and Reactive Programming
- Security Enhancements
- Command Line Flags
- Best Practices In Java 9
- Future Directions
- Java 9 Programming Blueprints
- Introduction
- Managing Processes in Java
- Duplicate File Finder
- Date Calculator
- Sunago - A Social Media Aggregator
- Sunago - An Android Port
- Email and Spam Management with MailFilter
- Photo Management with PhotoBeans
- Taking Notes with Monumentum
- Serverless Java
- DeskDroid - A Desktop Client for Your Android Phone
- What is Next?
- Bibliography
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app