我以EXE格式使我的可执行文件jar,但是我想添加jre [英] I make my executable jar in exe format,but i want to add jre with this

查看:158
本文介绍了我以EXE格式使我的可执行文件jar,但是我想添加jre的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以EXE格式使我的可执行文件jar,但是我想添加JRE,因为如果JRE不在他们的机器上,他们可以使用这个包含JRE。

I make my executable jar in exe format, but I want to add JRE with this because if JRE is not present in their machine, they can use it with this included JRE.

但我不想在他们的机器上安装这个JRE。此JRE仅由此应用程序使用。它将只是喜欢游戏或其他应用程序。我使用launch4j来创建jar,但是我没有找到任何可以附加JRE的选项,并且没有任何可以动态链接我的jar的选项。

But I do not want to install this JRE in their machine. This JRE is only used by this application only. It will just like game or other application. I use launch4j to make jar to exe but i did not find any option from where it can attach JRE and it has no option from where I can link my jar dynamically.

如何实现?

如果有其他免费安装程序,请提及它,请以例子的方式给出。

If there is other free installer then mention it, and please give the procedure with example.

推荐答案

既然已经确定你的应用程序。有一个GUI,我将建议 Java Web Start 作为 答案。 / p>

Since it has been established that your app. has a GUI, I will suggest Java Web Start as the answer.


但是我不想在他们的机器上安装这个JRE。

But I do not want to install this JRE in their machine.

这不是一个明智的要求。用户可能已经安装了可用的JRE,如果他们不可能也不希望每个Java应用程序都安装自己的私有JRE。

That is not a sensible requirement. The user might already have a usable JRE installed, if they don't they probably also don't want every Java based application to be installing its own 'private' JRE.

Oracle的 deployJava.js 可以进行检查,并帮助用户指导用户完成安装步骤(基本上是在出现提示时单击确定)。

Oracle's deployJava.js can do the checking, and help guide the user through the steps of installing (which basically comes down to click 'OK' when prompted).


我以EXE格式使我的可执行文件jar。

I make my executable jar in exe format,..

如果您只打算支持Windows,Java中编码的吸引力是甚么? JWS支持任何Java可用的平台。这给应用程序带来了更多的潜在客户。

If you only intend to support Windows, what is the attraction of coding in Java? JWS supports any platform for which Java is available. That brings a lot more potential customers for the app.


我想使用免费的安装程序。

I want to use free installer.

JWS是完全免费的。就像JRE一样。

JWS is entirely free. Just like the JRE.


..请举例说明。

..please give the procedure with example.

您是否运行IDE?如果没有,否则安装Ant?如果对任一个都是肯定的,请查看我的小型 JNLP API示例。每个都有完整的源代码和一个构建文件(Ant build.xml )。

Do you run an IDE? If not, do you otherwise have Ant installed? If that is a yes to either one, check out my small JNLP API examples. Each comes with complete source and a build file (an Ant build.xml).

在几个击键&安培;一会儿,你可以看到应用程序。在桌面上安装并启动。对于最终用户来说,它更简单。只需点击一个网页上的一个链接,这一切都会自动发生(可能有一个安全提示 - 用于保护用户)。

Within a couple of keystrokes & a few moments, you can see the app. installed and launched on your desktop. For the end user, it is even simpler. Just click a link in a web page, and it all happens automatically (possibly with a security prompt - for the protection of the user).

这篇关于我以EXE格式使我的可执行文件jar,但是我想添加jre的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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