that is how you use P2P programs
Are you sure? I don't know for sure myself, to be honest. If your private network is connected to the public network via NAT, how does any host on the public or private network address a network packet to a host on your private network? It absolutely cannot without the co-operation of the host doing NAT. There is at least one standard of sorts for this - it's Universal Plug and Play (UPnP) - and there are java projects:
java upnp - Google Search
Universal Plug and Play - Wikipedia, the free encyclopedia
The problem is that without that third host, you really do need something on the private network that is capable of mapping public traffic onto private traffic with a little help from some config supplied by private hosts. UPnP might work, but not all routers can do it and not all that can can do it well.