Launch4J和Java Web Start的结合? [英] Combination of Launch4J and Java Web Start?

查看:125
本文介绍了Launch4J和Java Web Start的结合?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作的JNLP应用程序,我需要分发给各种非技术最终用户。

I have a working JNLP application which I need to distribute to various non-technical end users.

如果用户的机器安装了最新的JVM,一切都很好。他们只需双击我发送的JNLP文件,Java Web Start完成其余的工作。

If the user's machine has a recent JVM installed, everything is fine. They just double-click the JNLP file I send them and Java Web Start does the rest.

现在我想分发一些有或没有JVM的东西,例如:一个 .exe 文件,如果没有,则自动下载兼容的JVM,然后调用 javaws.exe 下载.jar文件并启动应用程序。

Now I would like to distribute something that works with or without a JVM, e.g. a .exe file that auto-downloads a compatible JVM if none is present, then invokes javaws.exe to download the .jar files and launch the application.

Launch4J是我找到的最接近的匹配项,但它无法通过 javaws.exe启动程序。唯一的选择是 java javaw

Launch4J is the closest match I have found, but it cannot launch a program through javaws.exe. The only options are java and javaw

我会喜欢的产品可以:


  • 生成一个独立的 .exe 文件不需要预先安装JVM

  • 解析 .jnlp 文件并确定必要时下载的正确JVM(I知道Java Web Start可以在必要时下载JVM,但我想避免必须下载两个,第一个用于引导Java Web Start,第二个用于运行可能需要特定但不同JVM的应用程序。)

  • 自动下载并安装JVM,只需将用户定向到Java下载页面或打开新的安装向导。

  • 提示必要时使用管理员密码(有关安装JVM的权限。我不认为这是内置于Sun JVM安装程序中。)

  • 仅显示一个安全对话框(我想提示用户只需一次,确认他们信任生成的 .exe ,但我不希望第二次提示确认他们信任来自同一来源的 .jar 文件并且使用相同的证书签名。)我认为这将需要自动下载程序在启动JWS之前安装证书。)

  • (不是必需的)下载应用程序资源(例如与JVM同时在后台的 .jar 文件)。这需要在安装JVM之前运行缓存,因此缓存必须以本机代码实现, DownloadService 稍后将使用JNI与其连接。 / li>
  • Generate a self-contained .exe file that does not require a JVM to be pre-installed
  • Parse the .jnlp file and determine the correct JVM to download if necessary (I know Java Web Start can download a JVM if necessary, but I want to avoid having to download two, the first to bootstrap Java Web Start and the second to run the application which may require a specific but different JVM.)
  • Download and install the JVM automatically, not simply direct the user to a Java download page or open a new installation wizard.
  • Prompt for an admin password if necessary (for permissions to install the JVM. I don't think this is built into the Sun JVM installers.)
  • Show only one security dialog (I would like to prompt the user just once, to confirm they trust the generated .exe, but I do not want a second prompt to confirm they trust the .jar file which will be from the same source and signed with the same certificate.) I assume this will require the auto-downloader to install the certificate before launching JWS.)
  • (not essential) Download application resources (e.g. .jar files) in the background simultaneously with the JVM. This would require the cache to be running before the JVM is installed, so the cache would have to be implemented in native code and the DownloadService would later interface to it using JNI.

这样的产品是否存在?我怀疑它没有,但它值得一试。

Does a product like this exist? I suspect it does not but It's worth a shot.

更新我发现这篇文章它有一些相关问题的解决方案,虽然它是专为离线安装而设计的,我主要关注的是在线安装。

Update I found this article which has solutions to some related problems, though it is designed for offline installation and I am mostly concerned with online installation.

推荐答案

我遇到了同样的问题。我最终得到了一个BAT,一个Shell,最终是Mac的DMG。

I've run into the same problem. I ended up with a BAT, a Shell and eventual a DMG for Macs.

我发现这个关于使用Nullsoft安装程序的Windows自动JRE安装的评论:

I found this comment on automaded JRE installation for Windows using Nullsoft installer:

http://nsis.sourceforge.net/Java_Launcher_with_automatic_JRE_installation

我认为在JNLP之外你会发现很难获得所有平台的自动化。然而,在我的项目上,长达两年,我还没有看到有关用户必须自己获取java的抱怨。我相信大多数机器都已经拥有它。 Windows用户抱怨没有快捷方式,但使用vbs很容易。

I think outside JNLP you will find hard to get automation for all platforms. However on my project, up for two year, I haven't seen complains about users having to get java by themselves. I believe most machines will have it already. Windows user complained about not having a shortcut, but that is easy to do using vbs.

同样在Mac DMG AppBundle上,他们可以指定JRE。 Mac将拥有最新版本,除非是基于PowerPC的旧机器。在这种情况下没有Java6。

Also on the Mac DMG AppBundle, their is way to specify the JRE. Mac will have the lastest version, unless the are older PowerPC based machines. In that case no Java6.

你最终得到了几个启动器,我建议采用自动更新策略。

Of you end up with several launcher, I would recommend an automated update strategy.

这篇关于Launch4J和Java Web Start的结合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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