To create P2P applications you must have a means for discovering and interacting with other peers. Most of the difficulties involved in creating P2P applications are related to maintaining the network of peers, formatting and passing messages, discovering other peers, and other similar issues.
Project Jxta and its Java binding handle these aspects of your application. By using Jxta, you can focus on your application, not generic P2P issues. Jxta is a shortened version of the word juxtapose, which means side-by-side.
You can download Jxta from
here.