Java Web Start的(JNLP)在Java小程序的优势 [英] Java Web Start (JNLP) advantages over Java Applet

查看:127
本文介绍了Java Web Start的(JNLP)在Java小程序的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你怎么认为是一个Java Web Start的项目针对Java小程序的优势/劣势?我们试图弄清楚我们应该使用什么类型的为我们的新的应用程序。我们已经开发了一个桌面应用程式(JAR),我们正在努力使来自每一个机器,它已经安装了Java可用,而不需要安装它。

有什么想法?


解决方案

  1. 的Applet /浏览器/ JRE的交互问题。如果你不明白我的意思,甚至没有一个暗示(从失去的头发),然后部署小程序将是一个陡峭的学习曲线。

  2. 什么是浏览器带来的交易吗?如果答案是JS的交互性,与现有的基于HTML的Web应用程序的集成,或者其他一些相关的东西,足够了。如果没有,那么问问自己部署的应用程序的优势。包裹在一个浏览器窗口真的?

  3. JWS罐缓存和更新更可靠(和可编程控制下服用,如果需要的话)。

  4. AppletContext 提供了一些能力,一个小程序与环境互动,但JNLP API已经超出了交流可以实现(大部分)。

  5. 一般可用性。这些可能会或可能不会对您的用例中的问题。

    1. 一个自由浮动JWS部署应用程序。当浏览器被关闭没有得到封闭,不吃亏的标签改变焦点的损失。

    2. 如果每3小程序与控件嵌入到1页的链接,得到什么重点?由于Sun从来没有困扰到指定应该发生什么(根据他们)已经随着时间的推移跨越的JRE是不同的。现在,它是常见的JRE抓住重点,为小程序。如果这样做,它通常不可能使用键盘(单独),以获得在网页的链接和其他可聚焦的元件。

    3. 这是更容易调整一个桌面应用程序。

    4. 一个桌面应用程序。 (与开机画面,桌面快捷方式使用图标等)可以看起来更专业。


当然,应该提到的是,线变得模糊:


  1. 由于JWS被引入,它可以发射小程序

  2. 由于插件2建筑JRE,JWS可以启动小程序嵌入仍然在网页中。


  

我们正在努力使..是从每一个机器,它已经安装了Java可用,而不需要安装它。


我要拨开,而不需要安装它的这一要求,因为总是有时间的推移和需要更新的插件。关于这一点,使用<一个href=\"http://download.oracle.com/javase/7/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit\"相对=nofollow> deployJava.js 处理JRE最低版本检查。该脚本将或者嵌入一个applet或检查最低Java是可写后一个链接到一个JNLP启动文件。

另请参见

该堆栈溢出的信息。对于标签页:

What do you think are the advantages/disadvantages of a Java Web Start project against an Java Applet? We're trying to figure out what type we should use for our new application. We've already developed an Desktop App (JAR) and we're trying to make is useable from every machine, which has Java installed, without the need of installing it.

Any thoughts?

解决方案

  1. Applet/browser/JRE interaction problems. If you don't know what I mean, don't even have an inkling (from lost hair) then deploying applets will be a steep learning curve.
  2. What does the browser bring to the deal? If the answer is JS interactivity, integration with an existing HTML based web app., or a few other related things, plenty. If not, then ask yourself what the advantage of deploying the app. wrapped in a browser window really is?
  3. JWS Jar caching and update is more reliable (and can be taken under programmatic control, if needed).
  4. The AppletContext provides some ability for an applet to interact with the environment, but the JNLP API goes beyond what the AC can achieve (mostly).
  5. General usability. These may or may not be a problem for your use-case.

    1. A free floating JWS deployed app. does not get closed when the browser gets closed, and does not suffer focus loss on tab change.
    2. If 3 applets each with controls are embedded in 1 page with links, what gets focus? Since Sun never bothered to specify what should happen (according to them) it has been different across JREs over time. Now it is common for the JRE to grab focus for the applets. If it does, it it generally impossible to use the keyboard (alone) to get to the links and other focusable elements in the web page.
    3. It is far easier to resize a desktop app.
    4. A desktop app. (with splash screen, desktop shortcut with icon etc.) can look much more professional.

Of course, it should be mentioned that the lines become blurred:

  1. Since JWS was introduced, it could launch applets
  2. Since the Plug-In 2 architecture JRE, JWS could launch applets that remained embedded in a web page.

..we're trying to make is useable from every machine, which has Java installed, without the need of installing it.

I would sweep aside the 'without the need of installing it' requirement of that since there is always the passage of time and the need for updating plug-ins. On that note, use deployJava.js to handle JRE minimum version checking. The script will either embed an applet or write a link to a JNLP launch file after checking minimum Java is available.

See also

The Stack Overflow info. pages for tags:

这篇关于Java Web Start的(JNLP)在Java小程序的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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