简体   繁体   中英

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

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)?

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

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.

I had this problem also and i came to this page but i couldn't solve it at first because i thought my system didn't have 'ProgramData' in my C: drive because its hidden i guess. This is what worked for me. Go to the windows file explorer and delete the 'JAVA_INSTALL_FLAG' files in all these directories

%ProgramData%\Oracle\Java
%UserProile%\AppData\LocalLow\Sun\Java
%UserProile%\AppData\LocalLow\Oracle\Java

Then Java jdk installs smoothly. i have recreated this problem and tried this solution again and it works.

This helped me:

DELETE:

%USERPROFILE%\AppData\LocalLow\Oracle\Java\JAVA_INSTALL_FLAG
and
%USERPROFILE%\AppData\LocalLow\Sun\Java\JAVA_INSTALL_FLAG

on windows 10, delete below directories,

C:\\Program Files\\Java C:\\ProgramData\\Oracle\\Java C:\\Users\\%UserName%\\AppData\\LocalLow\\Sun\\Java C:\\Users\\%UserName%\\AppData\\LocalLow\\Oracle\\Java

and try again.

Kill any remaining Windows® installer msiexec.exe processes using the Task Manager of Windows. The Windows installer process apparently locks any java files/processes which blocks the Java JDK to be updated.

My problem installing Java 9 began after I upgraded JetBeans IntelliJ which uses Java JRE/JDK. I first tried the suggested solution that BlackSheeep posted , but without any luck.

我的意思不是便宜,而是Control Panel > Uninstall a program > Java 9是你的朋友

I blue-screened during a JDK-19_64.msi installation. I have tried restarting and removing the lock files. It kept giving me the "another java installation is in progress."

I fixed it by cleaning out my %temp%\ folder.

For Windows 11, and recent Java versions, delete lock files as mentioned by others. Then delete temp files.

1. Press Windows +R
2. Type temp ->delete all files
3. Again press Windows + R -> Type %temp% -> delete all files

Try locating the lock file here:

%USERPROFILE%\AppData\LocalLow\Oracle\Java

Deleting it allowed my Java 10 installation to start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM