Using Solr From Java
SolrJ
Solrj is a robust Java client for adding, deleting and updating documents with Solr. Solrj includes an option to access an embedded solr instance without the need to run an HTTP server.
SimplePostTool
Solr includes a simple class to post data:
SimplePostTool.java