Im not sure if your question is clear - but I guess you mean that the client need to point to the server's ip? so that you can login and perform transactions?
if thats the case, why dont you just use a domain name? you can make a domain name point to an ip via DNS. And if your client needs to go through a certain port, then you can connect your client like: "chat.mydomain.com:8888"
and when the ip changes, you just need to update the domain to the new ip instead of recompiling the program and forcing everyone to download a new copy of the client.
note however, most dns updates takes as little as 1 hour to as much as 48 hours to propagate worldwide - but surely this is better than recompiling a new client. on the other hand, your server should really be on a static ip. or you can get a hosting service for java with sql server and static ip for about 10 dollars a month.
