我希望通过复制Java文件夹的内容并设置环境变量来确保一切都能正常工作。

我通常在虚拟机中运行安装程序,压缩\java文件夹内容,回到虚拟机的快照,然后解压缩压缩文件。

我找不到一个地方有最新的JRE / JDK压缩文件…

http://java.sun.com/javase/downloads/index.jsp

http://download.java.net/jdk6/

另外,假定sun的exe安装程序只是解压缩整个文件,而不会弄乱注册表、环境变量等等,这是否安全?

相关:在Windows上手动安装Java ?

-- 经过这么长时间,我找到了这个网站,似乎正是我要找的(2018-05-22)


当前回答

Sun JVM可以作为MSI,它可以从脚本执行。

http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/install-msi.html

其他回答

下载javase和JDK

jdk从Oracle网站http://www.oracle.com/technetwork/java/javase/downloads/index.html下载 解压缩exe。例如:jdk-8u5-windows-x64.exe 将以下文件:tools.zip(在解压缩文件夹下找到)解压缩到所需的JAVA_HOME。 更新JAVA_HOME环境变量以指向所需的路径。

测试版本:jdk-7u60-windows-x64.exe, jdk-7u60-windows-x64.exe

下载javaee和JDK

jdk从Oracle网站http://www.oracle.com/technetwork/java/javaee/downloads/index.html下载 解压缩exe。例如:jdk-7u55-windows-x64.exe Product\Packages\jdk.zip(在解压缩文件夹下找到)解压缩到所需的JAVA_HOME。 更新JAVA_HOME环境变量以指向所需的路径。

已测试版本:jdk-7u55-windows-x64.exe

The Process described by Igor and CharlesB Works to me, since IDE's like NetBeans and Eclipse permit specify the location of the JDK, even software like Apache Tomcat (the ZIP Distribution) use BASH - FILES to set it up (then specify the JDK location using relatives URI). I Have a USB-HardDisk With NetBeans, Eclipse, Apache Tomcat working with a JDK in "portable mode". I Had a way to extract a copy of the JDK from the installers files: Install it, Copy it in other place and then uninstall it. A dirty way to extract it, but was successfull. The place to put EXTRA - LIBS was: %PLACE_WHERE_JDK_ARE%\jre\lib\ext

不幸的是,JDK不能作为可移植的ZIP文件提供。但是,你可以遵循以下步骤:

Create working JDK directory (C:\JDK in this case) Download latest version of JDK from Oracle (for example jdk-7u7-windows-x64.exe) Download and install 7-Zip (or download 7-Zip portable version if you are not administrator) With 7-Zip extract all the files from jdk-XuXX-windows-x64.exe into the directory C:\JDK Execute the following commands in cmd.exe: cd C:\JDK\.rsrc\1033\JAVA_CAB10 extrac32 111 Unpack C:\JDK\.rsrc\1033\JAVA_CAB10\tools.zip with 7-zip Execute the following commands in cmd.exe: cd C:\JDK\.rsrc\1033\JAVA_CAB10\tools\ for /r %x in (*.pack) do .\bin\unpack200 -r "%x" "%~dx%~px%~nx.jar" (this will convert all .pack files into .jar files) Copy all contents of C:\JDK\.rsrc\1033\JAVA_CAB10\tools where you want your JDK to be Setup JAVA_HOME and PATH manually to point to your JDK dir and its BIN subdirectory.

你可以从Azul Systems下载一个可移植的Zulu .zip存档,它是针对Windows, Linux (RHEL, SUSE, Debian, Ubuntu, CentOS)和Mac OS X的OpenJDK的构建。

Zulu是OpenJDK的认证版本,完全符合Java SE标准。Zulu是100%开源的,可以免费下载。现在,Java开发人员、系统管理员和最终用户可以享受开源Java的全部好处,包括部署灵活性和对升级时间的控制。

更多关于不同jvm(包括Zulu)及其体系结构和操作系统支持的技术信息。

谢谢关心;JDK似乎不与Windows注册表交互。

但是,JRE在某些情况下是这样的。

链接:http://www.rgagnon.com/javadetails/java - 0604. - html