Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install JDK 9 because "Another Java installation is in progress"

Tags:

I have been using JDK 9 on Windows 10 x64 for a while but when I went to install the latest early release (b174), I first uninstalled the previous version (as usual) and then ran the new installer.

It fails with a message box saying "Another Java installation is in progress. You must complete that installation before you can run this installer".

It seems there are some artifacts around causing the problem but only for JDK 9 as I can uninstall & reinstall JDK 8 without any issues. Also, the same problem occurs if I try to run the installers for any prior JDK 9 releases as well (even though they worked before).

Searches have suggested various options like using a Microsoft MSI clean-up tool and registry hacks but nothing is helping.

Can anyone suggest a way to get JDK 9 installed (as now I cannot use any release of JDK 9 at all)?

like image 236
Clancy Merrick Avatar asked Jun 20 '17 00:06

Clancy Merrick


People also ask

Can't install JDK 9 because another Java installation is in progress?

Solution: Deleting the lock files, unlocks the Installer and Java can be installed again. This is for Java 9, for Java 10 see this answer below. In my case (for Java 10), I had an additional lock file at %USERPROFILE%\AppData\LocalLow\Oracle\Java\JAVA_INSTALL_FLAG.

How do I fix JDK 1335 error?

The problem got solved when I switched to chrome browser, downloaded and installed again. Oracle provides SHA256 checksums for their JDK downloads. Using DownThemAll addon for Firefox with the checksum helped me when I got error 1335.


2 Answers

On Windows, Java prevents starting the Installer twice by creating (two) lock files. If those files exist, Java Installer show the Message: "Another Java installation is in progress (...)".

If Java Installer crashes, or Windows crashes during Java Installation, the installer cannot delete the lock files when finalizing.

Solution:

Deleting the lock files, unlocks the Installer and Java can be installed again.

The lock files are located at:

C:\ProgramData\Oracle\Java\JAVA_INSTALL_FLAG %USERPROFILE%\AppData\LocalLow\Sun\Java\JAVA_INSTALL_FLAG %USERPROFILE%\AppData\LocalLow\Oracle\Java\JAVA_INSTALL_FLAG 
like image 79
BlackSheeep Avatar answered Oct 02 '22 02:10

BlackSheeep


Although this was written for JDK9, JDK10 will suffer from the same issue BUT the lock location is different. The new lock file is located in %USERPROFILE%\AppData\LocalLow\Sun\Java\JAVA_INSTALL_FLAG.

Simply deleting this file should allow you to proceed with the install.

like image 27
AhmedBM Avatar answered Oct 02 '22 01:10

AhmedBM