添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I'm trying to figure out a way to add a self-update feature to a Java/Swing application I'm working on.

Basically I've got a bunch of jar files with extra functionality to be re-deployed to the installed users when they change. Nothing complicated, just check if a new version has been released, download them over HTTP, and then optionally offer to restart the app to the user.

I had a look at webstart, and it could work. But this particular app does some funky stuff with classloading and GC memory settings that don't look like they are supported via webstart, or will at least complicate matters. (It's a tweaked build of JMeter)

I also went down the road of adding in this plugin handler http://swing-fx.blogspot.com/2008/06/add-auto-update-and-plugins-to-your.html, but it is very alpha, and tries to do too much with the usual bugs you get with alpha stuff.

I did the exact same thing. But that was long back so there are probably better tools today.

What I found out I needed was a loader. The loader main program did not have the app jars in classpath. It first downloaded an update if required and then created a custom classloader with the app jars in class path and invoked the main method of the application main class. It is not very complicated. IIRC I needed to do this because the jars could not be overwritten in windows if they were already in classpath.

Hope this helps.

I'm trying to figure out a way to add a self-update feature to a Java/Swing application I'm working on.Basically I've got a bunch of jar files with extra functionality to be re-deployed to the install...     C/S 程序 自动 升级 是一个很重要的 功能 ,原理其实很简单,一般包含两个 程序 一个是主 程序 ,也就是除了 升级 功能 以外的 程序 ,另一个就是 升级 程序 ,常见的360,金山安全卫士都是这样。  主要包括以下几点:   1 比较版本  2下载文件  3 更新 文件 4启动主 程序 。但其中的需要注意的细节很多。      一般服务端会有一个配置文件包含最新 更新 的文件信息的配置文件,当...
RockLei--------给 Swing 项目 添加 一个 更新 程序 更新 程序 以前没做过,直接开干思路就是下载文件,替换文件,简单直接项目是用 Swing 做的,用exe4j打包成exe文件给用户 Java 的资源包放在根目录lib文件夹中, 更新 的话只需要替换里面的jar就行了直接上代码/** * @Auther: Eiden J.P Zhou * @Date: 2018/4/8 * @Descriptio...
最近由于一个工程需要做 应用 程序 启动时,自动 更新 的项目 在GOOGLE上找了半天也没见到什么比较好的办法 自己动手写了一个通过版本号检查网络上是不是存在新的 更新 文件,并自动通过HTTP下载文件的 程序 希望对正在找此类 程序 的朋友有帮助 本地文件需要一个ver.txt  此文件内容为本地软件版本号 网络上我直接在一个页面上打印出网络存在的版本号 例如,这个例子里,我在 http://XXX.