This was a project I worked on during my studies at the Technical University of Berlin.
This is a simple example how encrypt communication between to parties with java.
mvn install
sh startApplicationOne.sh
After ApplicationOne started, run:
sh startApplicationTwo.sh