Java(桌面)应用程序的“自动更新”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/305461/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 11:51:45  来源:igfitidea点击:

"Automatic updates" for Java (desktop) application?

javapluginsdesktop-applicationauto-update

提问by stolsvik

What system do you recommend for implementing "automatic updates" for some java (desktop) application? I'd also want to have module/plugin installation and update. Think Eclipse and Firefox.

您推荐什么系统来为某些 Java(桌面)应用程序实现“自动更新”?我还想安装和更新模块/插件。想想 Eclipse 和 Firefox。

I'm aware of Eclipse RCP's OSGi stuff, and also NetBeans RCP has something here. Do one have to buy wholly into their respective RCP stuff to use their module and automatic update systems?

我知道 Eclipse RCP 的 OSGi 东西,NetBeans RCP 也有一些东西。是否必须完全购买他们各自的 RCP 产品才能使用他们的模块和自动更新系统?

Are there other options?

还有其他选择吗?

回答by Ma99uS

Have you looked at the Java Web Start? It checks for updated module on the server and downloads it only if required otherwise things are cached locally on the client PC and starts from there.

你看过Java Web Start吗?它检查服务器上的更新模块,并仅在需要时下载它,否则内容会在客户端 PC 上本地缓存并从那里开始。

回答by Stephane Grenier

I believe install4J now offers this functionality as part of their install builder (http://www.ej-technologies.com/products/install4j/overview.html) We've been wanting to check it out but haven't had a chance yet.

我相信 install4J 现在提供此功能作为其安装构建器的一部分 ( http://www.ej-technologies.com/products/install4j/overview.html) 我们一直想检查一下但没有机会然而。

回答by davetron5000

Web Start is great if you have infrequent updates and good bandwidth.

如果您的更新不频繁且带宽充足,则 Web Start 非常有用。

If not, however, you need something else. I worked on a project where we had frequent updates and horrible bandwidth. We rolled our own classfile server; the startup code would talk to the server to see if updates were needed on a per-class basis. If so, the changed classes were downloaded and the application continued as normal.

但是,如果没有,您还需要其他东西。我在一个项目中工作,我们经常更新和可怕的带宽。我们推出了自己的类文件服务器;启动代码将与服务器通信,以查看是否需要在每个类的基础上进行更新。如果是,则下载更改后的类,应用程序继续正常运行。

It was actually not terribly complicated, so don't be afraid to roll your own if existing tools don't work.

它实际上并没有特别复杂,所以如果现有工具不起作用,请不要害怕自己动手。

回答by Yang Meyer

Take a look at Equinox p2, which is probably what you meant by "Eclipse RCP's OSGi stuff"... AFAIK you willneed to OSGi-ify your app to use p2 (which at the very least means making your whole application one big bundle).

看看春分P2,这可能是你的意思是“Eclipse RCP的的OSGi的东西” ......据我所知,你需要OSGi的IFY您的应用程序使用P2(这起码意味着让你的整个应用程序的一分大束)。