JRE安装如何工作? [英] How does JRE installation work?

查看:209
本文介绍了JRE安装如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在打包我的软件,并想知道JRE的安装是如何工作的。它只是复制本地系统上的二进制文件并相应地设置类路径或安装程序完成任何其他步骤吗?

I was working on packaging my software and wondering how does the installation of JRE work. Does it simply copy the binaries on the local system and set the classpath accordingly or any other steps are done by the installer?

对于Windows,JRE二进制文件存储在 C:\Program Files\Java\jre7 我可以将此文件夹复制到其他计算机(使用相同处理器32位或64位)以使JRE正常工作。如果是这样,那么需要设置的环境变量是什么?

For windows the JRE binaries are stored in C:\Program Files\Java\jre7 can I copy this folder into some other machine(with same processor 32bit or 64bit) to make JRE work. If that is so then what are the environment variables that are needed to be set?

推荐答案


我可以将此文件夹复制到其他机器(使用相同处理器32位或64位)以使JRE正常工作

是没有问题。除非您还想注册.jar扩展名以便双击它们。

Yes, no problem. Unless you also want to register the .jar extension so that you can double-click them.

在这种情况下,请查看 ftype assoc 命令。他们可以这样做,例如来自批处理文件或安装程序。

In that case check out the ftype and assoc commands. They can do that e.g. from within a batch file or installer.


如果是这样,那么需要设置哪些环境变量?

无需设置任何环境变量。

No need to set any environment variable.

只需确保在启动应用程序时正确地限定javaw.exe(或java.exe)的路径(例如通过批处理文件)。

Just make sure you qualify the path to javaw.exe (or java.exe) correctly when starting your application (e.g. through a batch file).

这篇关于JRE安装如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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