Built-in classes/methods instead of authorize and token endpoints

I am using authorize to redirect my page to okta login page. Using token endpoints once i get the access and id token once i get code from authrorize endpoint response. Then validating the access token and getting user details.

I would like know if there are any built-in library that i can use instead of my own composed URL for authorization and instead of token endpoint i can just something from the existing library?

I am using java application.

For Java, we have a Spring Boot Starter you can use that will handle the flow for you: GitHub - okta/okta-spring-boot: Okta Spring Boot Starter. You can find complete sample applications here: GitHub - okta/samples-java-spring: Spring Boot samples

We are not using sprint boot in our application. Just java. Any option for that?