This repository contain examples of new JDK 9 features.
List of examples:
- HttpClientExample: new HttpClient API showcase using synchronous and asynchronous call,
- HttpURLConnectionExample: pre-JDK9 HttpURLConnection example,
- ProcessInfo: new Process API,
- multiple-modules: Project Jigsaw showcase. Example how to create, compile and package multi-module project.
- Download and install JDK9 Early Release.
- Download and install IntelliJ Idea. Version 2016.1.1 is required.
- Clone jdk9-examples as a new project.
- In the
Project settings
add new SKD using newly installed JDK9
5. Set Project SDK
to newly added JDK9 and Project language level
to 9 - JDK modularization etc.
6. Set Project compiler output
to out
directory
- jdk9 module. Set
Content Root
to$PROJECT_DIR\jdk9\src\jdk9
directory.
- org.example.module.api module. Set
Content Root
to$PROJECT_DIR\multiple-modules\org.example.module.api
directory.
- org.example.module.impl module. Set
Content Root
to$PROJECT_DIR\multiple-modules\org.example.module.impl
directory.
8. Configure dependencies for org.example.module.impl
module and add org.example.module.api
dependency.