JAVA methods of languagetool-commandline.jar

echo This is an est. | java -jar languagetool-commandline.jar -l en-US --json

Please help me with a JAVA solution on how to programmatically access languagetool-commandline.jar file and check the grammar of the text.

Also, please share some details on the JAVA methods of languagetool-commandline.jar

You can find some documentation here: Embedding LanguageTool in Java applications | dev.languagetool.org