Refresh token means user has given consent for auth for a particular period (6 months for SharePoint). When they expire, user has to grant that consent again to your App, so you need to redirect the user to your app page. You can read more on "Get a new context token" in https://msdn.microsoft.com/en-us/library/office/dn762763.aspx
However, if your Java client is a back-end application that operates without user interaction then you cannot redirect the user to app page. For this scenario, instead of refresh token you can use App Only Access permissions (of course user has to approve the app only access while installing the app).
With app only access, you can get a token and create clientContext without refresh token. Here you will be interacting with SharePoint just as an App (and not as an App + User). Take a look at GetAppOnlyAccessToken method in TokenHelper.cs (sorry, I have not worked with Java based SharePoint apps).