Future-proof Installation Method for Java 8 on Win XP
- Get the hex editor. A program called Hxd will work for this.
- Download the Oracle Java 8 online installer called
jre-8u11-windows-i586-iftw.exe (this is the smallest of the two Windows executables. Running it downloads the latest version of Java every time).
The latest version of Java can be obtained from this page, there is no direct link.
Java SE Runtime Environment 8 Downloads
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Open jre-8u11-windows-i586-iftw.exe (or a newer executable) using Hxd
Search and replace (in hexadecimal mode) two occurrences of RegDeleteKeyExA and replace them with RegDeleteKeyA (deprecated API name). Remember to use hex mode:
Replace
52 65 67 44 65 6C 65 74 65 4B 65 79 45 78 41
from
52 65 67 44 65 6C 65 74 65 4B 65 79 41 00 00
Save the file renamed to jre-8u11-windows-i586-iftw__Patched.exe
Run the corrected program, if you corrected it correctly, it will complain that your OS is too old.
Disable the popup and install Java 8. It will download the latest version of Java from Oracle every time it starts.
Click on your desktop [Start], right-click "My Computer" and left-click on "Properties".
Click the Advanced tab, and then the Environment Variables button. You do not need anything with the letters "java" in your PATH (a copy of java is installed in C:\WINDOWS\system32 , which is located in your PATH ). Clear all junk files from PATH , including java links (but obviously do not delete the C:\WINDOWS\system32 directory from your PATH variable).
Set the environment variable named JAVA_HOME (create it if necessary) in
JAVA_HOME=C:\Program Files\Java\jre8
Now everything should be installed correctly. You may need to reboot, but before you do this, check step 11.
If Java does not start (check with java -version), find the * .pack file, for example:
cd "c: \ Program Files \ java \"
dir / s * .pack
You can unpack them in one of these two ways:
- Unzip all the files with one command (in a batch file):
FOR /R %%f IN (*.pack) DO "%JAVA_HOME%\bin\unpack200.exe" -r -v "%%f" "%%~pf%%~nf.jar"
- Unzip all the files with one command (on the command line from the root of the JRE):
FOR /R %f IN (*.pack) DO "%JAVA_HOME%\bin\unpack200.exe" -r -v "%f" "%~pf%~nf.jar"
In the future, when you want to update Java, just run your patched program and it will select the latest copy of Java directly from Oracle and install it. There is no need to reinstall or set any environment variables (until you finish version 8 or want to use the JDK instead of the JRE).
This is a "fix - as soon as it should work for a while."
Rob Aug 10 '14 at 19:24 2014-08-10 19:24
source share