迁移小程序JWS [英] Migrating applet to JWS

查看:298
本文介绍了迁移小程序JWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大的Java小程序(约700 MB)。这是一个老的大项目,是由几个(7)小型项目使用fatjar单瓶都捆绑式。由于小应用程序是一个古老的技术,我有功能方面的问题(我的小程序没有签名),你能告诉我交换我的code到JWS(Java Web Start的)确切的好处,是交换机值得吗?

如果我切换到JWS我将能够分裂我的小程序分为几个罐子的,将加载和主缸(很像DLL)的使用呢?
我的目标是我目前的小应用程序分割成若干(7)独立的罐子。当我改变的东西在一个项目这样的话,我会上传只有一个小罐子包含发生改变的项目,而不是整体,大,fatjared小程序。

如果JWS也好不了多少,然后小程序,可以为您建议我使用SWING一些其他的技术吗?重写(和分离到MVC),所以它使用HTML或其他什么东西,整个事情是一个没有去。几乎我的小应用程序正在使用的所有控件是发放标准Swing控件特殊的自定义控件。


解决方案

  1. 返修的GUI出现在的JFrame

    1. 拆分项目成单独的罐子。

    2. 如果罐子是共同的一个特定的API,把它们放到一个JNLP扩展。他们可以很容易地用于其他项目的方式。


  2. 启动的JFrame 使用JWS。

在回答您的具体问题:


  

由于小应用程序是一个古老的技术,我有功能方面的问题(我的小程序没有签名),你能告诉我交换我的code到JWS(Java Web Start的)确切的好处,是交换机值得吗?


首先,是的,它是值得的。

立即任何你可能会小程序/浏览器/ JVM交互体验的问题都解决了。在自由浮动的应用程序。可调整大小,也更容易定制的帧标题等。用户可以继续使用应用程序。当浏览器被关闭。他们可以打开应用程序。离线时,如果它被配置为允许

在关于罐更新,引述 JWS标签维基


  

Java Web Start的(JWS)是用于直接从网络或互联网连接启动富客户端(秋千,AWT,SWT)桌面应用的Oracle公司的技术。它提供了点击安装用于支持Java的平台。


  
  

JWS提供了许多吸引人的功能,包括但不限于,闪屏,桌面集成,文件关联,自动更新(包括懒下载编程控制的更新),的当地人和放大器的划分;通过平台,建筑或Java版本,运行时环境(最低J2SE版本,运行时的选项,内存等),易于使用的扩展公共资源的管理。

的配置等资源下载

走上..


  

如果我切换到JWS我将能够到我的小应用程序分割成将被加载和主缸(很像DLL)的?

用了几个罐子的

是的。多达需要,见上文对于裸露的信息。


  

如果JWS并不比小程序更好,可你的建议我使用Swing一些其他的技术吗?


我会强烈建议使用JWS / Swing的。所以,不,我没有任何其他建议(这将是进场的好尽可能少的努力)。

来吧,试试吧。我想,你和你的用户将享受变化。

I have a big Java applet (about 7 MB). It's an old and big project that's made of several (7) smaller projects all bundled-up in single jar using "fatjar". Since applet is an old technology and i have problems with functionality (my applet is not signed) can you tell me exact benefits of switching my code to JWS (Java web start) and is the switch worth it?

If i switch to JWS will i be able to split my applet into several jar's that will be loaded and used by main jar (much like dlls)? My goal is to split my current applet into several (7) separate jars. That way when i change something in one project, i would upload only one small jar containing changed project instead of whole, big, fatjared applet.

If JWS isn't much better then applets, can you suggest me some other technology that use SWING? Rewriting (and separating into MVC) the whole thing so it uses HTML or something else is a no-go. Almost all controls my applet is using are special custom controls that extend standard SWING controls.

解决方案

  1. Rework the GUI to appear in a JFrame.

    1. Split the project into separate Jars.
    2. If the Jars are common to a specific API, put them into a JNLP extension. That way they can be easily used by other projects.

  2. Launch the JFrame using JWS.

In answer to your specific questions:

Since applet is an old technology and I have problems with functionality (my applet is not signed) can you tell me exact benefits of switching my code to JWS (Java web start) and is the switch worth it?

Firstly, yes it is worth it.

Immediately any of the problems you might experience with applet/browser/JVM interaction are solved. The free floating app. is resizable, and more easily customizable as to frame title etc. The user can continue using the app. when the browser is closed. They can open the app. when offline, if it is configured to allow that.

In regard to the Jar updates, quoting the JWS tag Wiki:

Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.

JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..

Onto..

If I switch to JWS will I be able to split my applet into several jar's that will be loaded and used by main jar (much like dlls)?

Yes. As many as needed, see above for the bare details.

If JWS isn't much better than applets, can you suggest me some other technology that use Swing?

I'd highly recommend to use JWS/Swing. So no, I do not have any other suggestions (that would approach being that good with as little effort).

Go ahead, try it out. I think you and your users will enjoy the change.

这篇关于迁移小程序JWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆