yes, it is absolutely possible to develop a Java-based application that interfaces with the Agreements Network. The best way, as you said, would be to use the REST API which allows you to register users, create templates for legal products, and make agreements.
The REST API is a Node.js application that you'd need to deploy and run and that interfaces with the blockchain and smart contracts. Now, that Node application requires you to sign transactions with a valid key (public/private key pair) that is registered for the Agreements Network. Before we go through more details around the key, would this be in line with your expectations?