United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6756264 %APPDATA%\Sun\Java\jre1.6.0_*\lzma.dll does not get deleted
JDK-6756264 : %APPDATA%\Sun\Java\jre1.6.0_*\lzma.dll does not get deleted

Details
Type:
Bug
Submit Date:
2008-10-06
Status:
Closed
Updated Date:
2011-02-17
Project Name:
JDK
Resolved Date:
2011-02-17
Component:
install
OS:
windows_xp
Sub-Component:
install
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u18 (b01)

Related Reports
Backport:

Sub Tasks

Description
Install 6u10 or 6u11 Windows online JRE installer
Expect: %APPDATA%\Sun\Java\jre1.6.0_*\lzma.dll to be deleted because it is no longer needed
Actual: %APPDATA%\Sun\Java\jre1.6.0_*\lzma.dll still exists

Uninstall JRE
Expect: %APPDATA%\Sun\Java\jre1.6.0_*\ to be deleted because it is no longer needed
Actual: %APPDATA%\Sun\Java\jre1.6.0_*\lzma.dll still exists

After the wrapper is done with lzma.dll during installation, it should be deleted by the wrapper.

                                    

Comments
EVALUATION

see comment by Chris
                                     
2008-10-22
EVALUATION

After some evaluation, it is found the key issue is that the lzma.dll is loaded in jinstall and not being released properly. So, it can't be deleted. So, the fix is to modify the code logic to release the dll in all of the scenarios. Chris G. will fix it in 6u14 since he owns the original code and knows the logic better.
                                     
2008-10-29
EVALUATION

Pete wrote the orginal code and I brought it into the install wrappers without testing ReleaseExtraCompression().
                                     
2008-10-29
EVALUATION

The handle for the lzma.dll was private as there was two HMODULE definition for the same variable (extraCompLibHandle), the one that was public was initialized to null and then later when the lzma.dll was loaded, another HMODULE was defined with same name (extraCompLibHandle) so the public extraCompLibHandle was never assigned a real value of the handle of the lzma load and the method void ReleaseExtraCompression(HINSTANCE
hInst) was using the public value which was initialized to null.  So removing the HMODULE definition from within the method updated the public value.  Also added logic to the FreeLibrary method to make sure the handle used for freeing up the lib is not null.  This change is done in WrapperUtils.cpp

Added another method added to RemoveFile to remove the lzma.dll as soon as its use is done.  This change is done in jinstall.cpp and jinstall.h

The file is not actually installed via the installer for which we use RemoveFile table so it does not make sense to add it there.
                                     
2009-07-23
EVALUATION

in latest build the correct behavior is happening, confirmed
                                     
2011-02-17



Hardware and Software, Engineered to Work Together