ARROW-16291: [Java] Support JSE17 for Java Cookbooks (#184)