Java should provide a way to make HTTP calls via cURL. You just need to be able to make HTTP calls.
Alternatively look at a Java library to skip that part and help.
From the libraries Discord

If none of that is of use, you literally just need to be able to make http get/post calls