I like to be sure that everything will work just by copying the contents of the Java folder and setting the environment variables.
I usually run the installer in a virtual machine, zip the \java folder contents, go back to a snapshot of the virtual machine, and then unzip the compressed file.
I couldn't find a place where the latest JRE / JDK is available as a zip file...
http://java.sun.com/javase/downloads/index.jsp
http://download.java.net/jdk6/
Alternately, is it safe to assume that exe installer from sun just will just unzip the whole thing, without messing around with the registry, environment variables, etc...?
Related: Installing Java manually on Windows?
-- After all this time I found this site that seems to be exactly what I was looking for (2018-05-22)
You can download a Java Portable from PortableApps.com. It will not change your system settings. You can put it on your USB stick.
UPD: for those who needs JDK there's an open-source project OpenJDK Portable
I discovered you can run the installer in Wine. This works:
WINEPREFIX=/home/jason/java wine jre-7u11-windows-i586.exe
Then once it is finished you can just zip up the
/home/jason/java/drive_c/Program\ Files\ \(x86\)/Java/jre7/
This should work for jdk as well
The Sun JVM is available as a MSI which is executable from a script.
http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/install-msi.html
I did copy the JRE folder several times and it always works fine. But I am really not sure if you can just get a zip file with its contents, as the official installation install the plugins for IE, Firefox and whatsoever.
OSX Instructions
Tested with
jdk-8u74-macosx-x64.dmg
..dmg
.pkg
, dragging it. Do not double-click (it will install).cd
into the package.mkdir jdk-$version && cd jdk-$version
xar -xf ../JDK*.pkg
cd jdk
TABtar zxf Payload
Contents/Home
folder contains the JDKFor JDK 8u102 things have changed, this worked for me:
Now you are ready to go. You might want to setup JAVA_HOME and PATH to point to your %JDK-VERSION% dir and its BIN subdir.