This post "Authenticate from the Command Line with Java" is hosted at https://developer.okta.com/blog/2022/04/11/java-cli-device-grant.