{"id":18863608,"url":"https://github.com/neiljbrown/java9-examples","last_synced_at":"2025-04-14T13:06:43.159Z","repository":{"id":89469410,"uuid":"125652887","full_name":"neiljbrown/java9-examples","owner":"neiljbrown","description":" Java code examples for the major new language features that were added to Java 9.","archived":false,"fork":false,"pushed_at":"2018-03-17T17:34:28.000Z","size":84,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T02:11:18.208Z","etag":null,"topics":["examples","java","java9"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neiljbrown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-17T17:24:05.000Z","updated_at":"2023-02-21T15:12:20.000Z","dependencies_parsed_at":"2023-03-13T18:09:29.441Z","dependency_job_id":null,"html_url":"https://github.com/neiljbrown/java9-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava9-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava9-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava9-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neiljbrown%2Fjava9-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neiljbrown","download_url":"https://codeload.github.com/neiljbrown/java9-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886314,"owners_count":21177643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["examples","java","java9"],"created_at":"2024-11-08T04:37:59.899Z","updated_at":"2025-04-14T13:06:42.456Z","avatar_url":"https://github.com/neiljbrown.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java 9 Examples\n\n## Purpose\nThis project provides a set of Java code examples illustrating the new language features and APIs introduced in Java 9. \n\nThe examples are implemented as a set of easy to run tests, using JUnit (5 and AssertJ).\n\n## Overview of New Language Features in Java 9\nIt's fair to say that there aren't any _big_ new language features for developers to get excited about in \nJava 9, as there were in Java 8 (such as the Stream API and Lambdas). The Java Platform Module System (JPMS) is by \nfar the biggest new feature in Java 9, affecting the platform libraries, the language and the runtime. However, beyond \nJPMS, performance improvements, and the new REPL, there are also a number of smaller, new language features introduced\nin Java 9 that are still worth Java programmers familiarising themselves with. A list of these less well publicised \nlanguage features is provided below. The ones highlighted (in bold) are those for which code examples are provided in \nthis project.\n\n+ **Factory methods for Collections** \n+ **Private methods in interfaces**\n+ **java.util.Optional enhancements** \n+ **Stream API enhancements**\n+ **Reactive Streams API standard implementation**\n+ **Process API enhancements**\n+ CompletableFuture enhancements\n+ Effectively final variables in try-with-resources blocks\n+ UTF-8 Property files\n+ Support for the Unicode 7 and 8 standard\n\n## Code\nThe source code for the examples can be found in the src/test/java folder.\n\nAn explanation and guidance on the usage on each of the showcased language features can be found in the Javadoc of \neach of the code examples. (See commands for generating Javadoc below).\n\n## Building and Running the Examples\nYou will need to install a Java 9 JDK. \n\nSupport is provided for building and running the project using either Gradle (see build.gradle) or Maven \n(see pom.xml). For Gradle, the minimum required version of Gradle will be installed if you use ./gradlew. For Maven, \nensure you install a version which supports Java 9. The project has been tested to work using Maven 3.5.3+.\n\n### Gradle\nTo compile and run all the example tests, enter the  following command in the project's root folder:\n\n```./gradlew clean test```\n\nTo generate the Javadoc use, the following command: \n\n```./gradlew clean javadocTests```\n\nThe generated Javadoc can be found in the standard location for a Gradle project - build/docs/javadoc/index.html.\nThis provides an example of the updated Javadoc generated in Java 9, which uses HTML5 and supports searching.\n\n### Maven\nTo compile and run all the example tests, enter the following command in the project's root folder:\n\n```mvn clean test```\n\nTo generate the Javadoc, use the following command: \n\n```mvn javadoc:test-javadoc```\n\nThe generated Javadoc can be found in the standard location for a Maven project - target/site/testapidocs/index.html.\n\n## Other Examples\nYou can find similar code examples for the new features introduced in earlier Java versions (e.g. 7 and 8) in my \nBitbucket projects at [https://bitbucket.org/neilbrown/](https://bitbucket.org/neilbrown/)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fjava9-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneiljbrown%2Fjava9-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneiljbrown%2Fjava9-examples/lists"}