English 中文(简体)
如何在 Java实施更新汽车?
原标题:How to implement auto update in Java?

All: I am facing a problem here, my app is composed by some jar files and some other files, they are all located in one directory. I am planning to implement an auto-update feature. When the app know there is a new version on the server, it will download a zip file to temp directory. After downloading, it will ask customer if he d like to install it. If yes, my app will exit and I need to unzip the zip file and overwrite all files in the original directory. Now I am wondering:

我怎么能够回避档案并 over灭目录? 创建文字(这意味着我需要书写视窗的批量和其他平台的批量)? a. 创建支薪阶层,以做到这一点?

在离开后,我怎么能开始这种描述/ava?

一旦完成这项工作,我如何删除安装装置? 在新版本何时开始时,将其保存在温床上并加以检查?


From later comments:

I know JWS is a good choice, but for reason "my boss denied", I can t use it.

最佳回答

可采取几种办法。 由于你说申请是交叉格式,因此最好利用 Java进行更新。

You can create a small jar file which will handle the update process. It could be part of the initial application (with the assumption it won t be updated) or it could be part of the update package (then you can update it as well).

因此,您的申请书下载了纸浆,没有包装给临时目录,并开始更新,然后从中提取。 更新者复制了旧的轮胎。


然而,我们最好不要重新发明轮.。 考虑使用国际社:它提供了更多的特点,需要较少努力执行。 必须有良好理由,以否定JWS。 你们应该通过解释利用日本妇女论坛的好处来说服你们。

问题回答

Since the app. has a GUI (judging by the Swing tag), deploy it using Java Web Start:

Java Webstart(JWS)是Oracle Corporation技术,用于直接从网络或互联网上发射丰富的客户(Swing、AWT、SWT)。 它为支持 Java的平台提供一只点击装置。

JWS提供了许多吸引力的特点,包括但不限于:闪电屏幕、桌面整合、档案协会、automatic Update(包括 la下载和对更新内容的方案控制)、分拨本地人和安插;按平台、结构或 Java版本分列的其他资源下载、临时环境配置(最低J2SE版本、实用选择、RAM等)、利用推广对共同资源的轻松管理。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签