对 Java Webstart 有异议吗?
自从 Adobe AIR 发布以来,我想知道为什么 Java Web Start 过去没有获得更多关注,因为在我看来,它似乎非常相似,但 Web Start 的可用时间要长得多。
这主要是因为 Sun 的营销不佳,还是除了需要安装正确的 JVM 之外还有更多技术问题? 您在使用 Web Start 时有过不愉快的经历吗? 如果是,是哪一个? 使用 Web Start 分发应用程序时您有什么建议?
Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time.
Is it mainly because of bad marketing from Sun, or are there more technical concerns other than the need of having the right JVM installed? Do you have bad experiences using Web Start? If yes, which? What are you recommendations when using Web Start for distributing applications?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我曾经在 JWS 做过一个项目,运行起来很痛苦。 更糟糕的是,我什至没有处理整个互联网,它只是一个小型应用程序,只有我办公室里的少数人会使用。 在配置服务器和帮助他们在客户端计算机上设置应用程序时,我不止一次厌恶地举起双手。
我认为 AIR 现在变得越来越流行(尽管我永远不知道它会走多远),因为它有人们真正想要使用的应用程序(说出您最喜欢的 JWS 应用程序...继续,我在等待),例如 twhirl。 我仍然不太喜欢 AIR 的工作方式,但它比 JWS 好得多。
I did a project once in JWS and it was a pain to get running. Worse yet, I wasn't even dealing with the entire Internet, it was a small application that only a few people in my office were going to use. I threw my hands up in disgust more than once while both configuring the server and helping them set up the application on the client machines.
I think AIR is now getting more popular (although I never know how far it will get) because it has applications that people actually want to use (name your favorite JWS app... go ahead, I'm waiting) like twhirl. I still am not a huge fan of the way AIR works but it's a hell of a lot better than JWS.
以下是 mindprob 的列表:
Here is a list from mindprob:
Java Web Start 是启动大型 Java 应用程序的正确方法,因为它可以轻松更新和安装/下载应用程序,并且比 Java 小程序提供更好的 UI/UX。
但是,使用具有默认设置的常见浏览器从网页启动 Java Web Start 应用程序存在一些障碍:
Sun/Oracle 无法创建有效的浏览器集成。 有关 Google Chrome / Chromium 的示例,请参阅 http://crbug.com/10877。 基本上,Java 插件无法实现所需的 NPAPI 内容,无法让 Firefox 和 Chrome 可靠地将 MIME 类型
application/x-java-jnlp-file
转发到javaws
/ < code>javaws.exe 二进制文件。Sun/Oracle 无法获取 Java Web Start
.jnlp
文件的真实注册 MIME 类型。application/x-
前缀从技术上讲意味着草稿或私有。当 Java Web Start 处理应用程序下载和启动时,Sun/Oracle 未能使用 URL 方案而不是 MIME 类型。 例如,如果不使用诸如
https://example.com/app/launch.jnlp
之类的 URL,Java Web Start 会作为javaws://example.com/app/launch 启动.jnlp
事情会更加顺利。 这是因为在这种情况下,Web 浏览器甚至不需要加载.jnlp
文件,它只需将完整的 URL 传递给方案处理程序(这将是javaws 二进制)。
注意重复的部分(“Sun/Oracle 失败了...”),您不再需要想知道为什么 Java Web Start 从未获得太多关注。 最大的缺失部分是获取一个网页链接,以使用给定的 .jnlp 文件可靠启动
javaws
二进制文件。 这在技术上应该非常简单(只需在安装 javaws 二进制文件时注册一个新的 URL 方案即可),但 Sun/Oracle 未能做到这一点。 我个人认为整个混乱是由于试图弄乱 MIME 类型而不是简单地使用新的 URL 方案造成的。 甚至 MIME 类型的东西也做得非常糟糕,因为大声哭泣。如果您仍然想使用 Java Web Start,只需准备好文档来正确配置浏览器即可解决 Sun/Oracle 留下的混乱问题。 好的一点是,只需完成一次,并且它适用于任何使用 Java Web start 的站点。 不好的部分是,通常浏览器从未被配置为使用
.jnlp
文件执行正确的操作,并且您会因使用“难以使用的技术”而受到指责,因为用户不想仅仅为了使用您的应用程序而配置他们的浏览器。 我有没有提到 Sun/Oracle 无法自动配置浏览器?Java Web Start is the right way to start bigger Java applications because it allows for easy updating and installing/downloading the application and allows for better UI/UX than Java applets.
However, there are some roadblocks for launching Java Web Start applications from a web page using common browsers with default settings:
Sun/Oracle failed to create a working browser intergration. See http://crbug.com/10877 for example about Google Chrome / Chromium. Basically the Java plugin fails to implement the required NPAPI stuff to get Firefox and Chrome to reliably forward the MIME-type
application/x-java-jnlp-file
tojavaws
/javaws.exe
binary.Sun/Oracle failed to get a real registered MIME-type for Java Web Start
.jnlp
files. Theapplication/x-
prefix technically means draft or private.Sun/Oracle failed to use URL scheme instead of MIME-type when the intent is that Java Web Start handles the application downloading and launching. For example, if instead of using URL such as
https://example.com/app/launch.jnlp
Java Web Start were launched asjavaws://example.com/app/launch.jnlp
things would work much smoother. This is because in this case, the web browser does not need to even load the.jnlp
file, it just passes the full URL to the scheme handler (which would be thejavaws
binary).Notice the repeating part ("Sun/Oracle failed ...") and you no longer need to wonder why Java Web Start never got much traction. The big missing part is getting a web page link to reliably launch the
javaws
binary with the given.jnlp
file. That should be technically really easy (just register a new URL scheme when thejavaws
binary is installed), yet Sun/Oracle failed to do that. I personally think that the whole mess was caused by trying to mess with the MIME-type instead of simply using a new URL scheme. And even the MIME-type stuff was done really badly, for crying out loud.If you still want to use Java Web Start, simply prepare good documentation for correctly configuring the browser to workaround the mess left by Sun/Oracle. The good part is that it's only needs to be done once and it will work for any site that uses Java Web start. The bad part is that usually the browser has never been configured to do the right thing with
.jnlp
files and you get the blame for using "hard to use technology" because users do not want to configure their browsers just to use your application. Did I mention that it was Sun/Oracle that failed to configure the browser automatically?我的经历:
我在 2006 年使用它,是一家银行的 Intranet 应用程序。
第一次下载还不错
然而当想要推出新版本时,
jar 文件的缓存不起作用,
所以新文件没有推送到客户端。
花了一周时间试图解决这个问题但没有成功。
My experience:
I used it ca 2006, intranet application for a bank.
First download was fine,
however when wanting to push out a new version,
the caching of the jar files did not work,
so the new files were not pushed to the client.
Spent a week trying to fix this without success.
我在一家银行的内联网工作了 5 年,我的部门开发并分发了很多 Java Web Start 应用程序,这些应用程序在世界各地使用,我认为 Java Web Start 拥有最好的桌面应用程序(易于开发,丰富的用户界面、客户端机器的处理能力)和互联网应用程序(易于部署和升级)。
我真的很喜欢 Java Web Start
I work in the intranet of a Bank since 5 years, and my departament has developed and distributed a LOT of Java Web Start Applications which are used all arround the world, i think Java Web Start has the best of the Desktop applications (easy development, rich user interface, processing power in the client machine) and the Internet applications (easy deployment and upgrade).
I really like Java Web Start
在我的公司中,我们使用 Java Web Start 来部署 Eclipse RCP 应用程序。 设置起来很痛苦,但一旦安装就可以很好地工作。 所以我唯一能提出的建议就是从小事做起,掌握窍门。 首先部署一个简单的应用程序。 尝试部署一个没有 JWS 经验的完整产品很快就会变得复杂起来。
此外,学习如何将参数传递给 JWS 应用程序对于调试来说非常有价值。 设置环境变量 JAVAWS_VM_ARGS 允许为 Java 虚拟机设置任意属性。 就我而言:
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=4144
当您需要在启动过程中检查问题时很有帮助(suspend=y)
我认为验收的主要问题Java Web Start 的缺点是设置比较困难。 此外,不知何故存在这种不和谐:当您有桌面应用程序时,人们期望有一个可以双击的安装程序。 当您拥有 Web 应用程序时,人们希望可以直接从浏览器使用它。 Java Web Start 既不存在,也不存在……
不过,它在 Intranet 中广泛使用。
In my company we used Java Web Start to deploy Eclipse RCP applications. It was a pain to setup, but it works very well once in place. So the only recommendation I could make is to start small, to get the hang of it. Deploying one simple application first. Trying to deploy a complete product that is already made without experience with JWS gets complicated rather quickly.
Also, learning how to pass arguments to the JWS application was invaluable for debugging. Setting the Environment variable JAVAWS_VM_ARGS allows setting any arbitrary property to the Java Virtual machine. In my case:
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=4144
Helpful when you need to check problems during start-up (suspend=y)
I think the main problem for the acceptance of Java Web Start is that it is relatively difficult to setup. Also, somehow there is this dissonance: When you have a desktop application, people expects a installer they can double click. When you have a web application, people expects they can use it right from the browser. Java Web Start is neither here not there...
It is widely used in intranets, though.