I downloaded JDK8 build b121 and while trying to install I'm getting the following error:
the procedure entry point RegDeleteKeyExA could not be located in the dynamic link library ADVAPI32.dll
The operating system is Windows XP, Version 2002 Service Pack 3, 32-bit.
Oracle has announced fix for Windows XP installation error
Oracle has decided to fix Windows XP installation. As of the JRE 8u25 release in 10/15/2014 the code of the installer has been changes so that installation on Windows XP is again possible.
However, this does not mean that Oracle is continuing to support Windows XP. They make no guarantee about current and future releases of JRE8 being compatible with Windows XP. It looks like it's a run at your own risk kind of thing.
See the Oracle blog post here.
You can get the latest JRE8 right off the Oracle downloads site.
There is also an alternate solution for those who aren't afraid of using hex editors (e.g. XVI32) [thanks to Trevor for this]: in the unpacked 1 installer executable (
jdk-8uXX-windows-i586.exe
in case of JDK) simply replace all occurrences ofRegDeleteKeyExA
(the name of API found in "new"ADVAPI32.DLL
) withRegDeleteKeyA
(legacy API name), followed by two hex '00's (to preserve padding/segmentation boundaries). The installer will complain about unsupported Windows version, but will work nevertheless.For reference, the raw hex strings will be:
replaced with
Note: this procedure applies to both offline (standalone) and online (downloader) package.
1: some newer installer versions are packed with UPX - you'd need to unpack them first, otherwise you simply won't be able to find the hex string required
This happens because Oracle dropped support for Windows XP (which doesn't have
RegDeleteKeyExA
used by the installer in itsADVAPI32.DLL
by the way) as described in http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-July/009005.html. Yet while the official support for XP has ended, the Java binaries are still (as of Java 8u20 EA b05 at least) XP-compatible - only the installer isn't...Because of that, the solution is actually quite easy:
get 7-Zip (or any other good unpacker), unpack the distribution .exe manually, it has one .zip file inside of it (
tools.zip
), extract it too,use
unpack200
from JDK8 to unpack all .pack files to .jar files (older unpacks won't work properly);JAVA_HOME
environment variable should be set to your Java unpack root, e.g. "C:\Program Files\Java\jdk8" - you can specify it implicitly by e.g.Unpack all files with a single command (in batch file):
Unpack all files with a single command (command line from JRE root):
Unpack by manually locating the files and unpacking them one-by-one:
where
packname
is for examplert
point the tool you want to use (e.g. Netbeans) to the
%JAVA_HOME%
and you're good to go.Note: you probably shouldn't do this just to use Java 8 in your web browser or for any similar reason (installing JRE 8 comes to mind); security flaws in early updates of major Java version releases are (mind me) legendary, and adding to that no real support for neither XP nor Java 8 on XP only makes matters much worse. Not to mention you usually don't need Java in your browser (see e.g. http://nakedsecurity.sophos.com/2013/01/15/disable-java-browsers-homeland-security/ - the topic is already covered on many pages, just Google it if you require further info). In any case, AFAIK the only thing required to apply this procedure to JRE is to change some of the paths specified above from
\bin\
to\lib\
(the file placement in installer directory tree is a bit different) - yet I strongly advise against doing it.See also: How can I get the latest JRE / JDK as a zip file rather than EXE or MSI installer?, JRE 1.7 - java version - returns: java/lang/NoClassDefFoundError: java/lang/Object
With JRE 8 on XP there is another way - to use MSI to deploy package.
or (silent way, usable in batch file etc..)