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

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

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

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

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

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

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

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


当前回答

JDK可以从这里以zip文件或。exe格式下载 http://installbuilder.bitrock.com/java/

其他回答

我发现你可以在Wine中运行安装程序。如此:

WINEPREFIX=/home/jason/ jre-7u11-windows-i586.exe

一旦完成,你可以压缩/home/jason/ Java/ drive_c/ program \ Files\ \(x86\)/Java/jre7/

这应该也适用于jdk

OSX指令

用jdk-8u74-macosx-x64.dmg测试。

从Oracle下载。dmg 挂载磁盘映像 提取.pkg,拖动它。不要双击(它会安装)。 打开一个终端并cd到包中。 Mkdir jdk-$version && CD jdk-$version xar -xf ../JDK*.pkg cd jdkTAB tar zxf有效负载 “Contents/Home”文件夹中包含JDK

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

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

在这里。下载.gz包。

这里是JDK 5 zip文件的链接。 sun-jdk-5-win32-x86-1.5.0.12.zip