Thesaurus.java implements a simple example to retrieve synonyms using web service http://thesaurus.altervista.org/service
The API key needed to the example with any word is available after registration in http://thesaurus.altervista.org/mykey
Run following command to build the application:
javac -cp json_simple-1.1.jar Thesaurus.java
Just use the following command to run the application:
java -cp .;json_simple-1.1.jar Thesaurus