Review request: JDK-6519127 Vista: user.home property not set correctly

Alexey Utkin alexey.utkin at
Fri Jan 18 15:30:59 UTC 2013

Hi Everyone,
Please review the fix.

Bug description:

Here is the suggested fix:

1] The registry branch was removed from the code as obsolete. It was 
actual only for Windows 95 M3 Beta. This approach is obsolete and is not 
supported by MS for decades.
For compatibility reasons the Registry path
"HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
is filling ones and is not supported in actual state.
Even more, in case of execute-as-service, impersonation, and "RunAs" 
call, User Registry hive could be unloaded or be outsider.

That fix should resolve the bunch of corner-case problems with 
impersonation and migration.

2] KF_FLAG_CREATE and CSIDL_FLAG_CREATE need to be use is case, than 
Java application is applied as Administrative Tool for Users management. 
Potentially the Java call could be the first profile request. For the 
case the real folder need to be created in time.

3] __try/__except trick for potentially absent DLL entry is known and 
successfully used in AWT. That simplifies code and checks function 
signatures on link time.

4] Function [GetJavaProperties] was changed for better 
"initialization-finished" condition checking in low-risky raise condition.

5] The pre-requirements for JDK build includes section
"Windows i586: Microsoft Visual Studio 2010 Compilers" about installed 
Windows SDK v 7.0a or later. That includes actual headers for Shell Lib
version 6.0.6000 with [SHGetKnownFolderPath] entry.


More information about the core-libs-dev mailing list