}
}
// Verify version:
try {
final VersionUrl data = VersionWSUtil.getLatestVersion(UPDATE_URL);
Version latestVersion = data.getVersion();
Version currentVersion = new VersionImpl(RCConstants.VERSION);
// Newer version available:
if(latestVersion.isGreaterThan(currentVersion)) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
final int opt = JOptionPane.showConfirmDialog(null,
"An updated version of RESTClient is available. Do you want to download?",
"Download update?",
JOptionPane.YES_NO_OPTION);
if(opt == JOptionPane.YES_OPTION) {
openUrl(data.getDlUrl());
}
}
});
}