更新应用程序时,最佳方法更改配置文件中的URL是什么?
我有一个Javafx客户端/服务器应用程序,其中客户端具有存储URL的config.ini文件。 我配置了Windows的更新方式,如果有更新,该程序将从服务器下载新的应用程序,然后运行BAT脚本并关闭,然后BAT替换JAR文件。更新时,我还需要替换配置中的URL地址,每次启动应用程序时,我想出的只是检查和替换URL。
但这是一个非常糟糕的决定。
仅在更新时才能替换URL,在什么时候更好?
I have a javafx client/server application in which the client has a config.ini file where the URL is stored.
I configured the update for Windows in such a way that if there is an update, the program downloads a new jar of the application from the server and then runs the bat script and closes, and bat replaces the jar file. I also need to replace the URL address in config when updating, and all I came up with is just checking and replacing the URL every time I start application.
But this is a very bad decision.
How can I replace the URL only when updating, and at what point is it better to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论