Review request: JDK-6519127 Vista: user.home property not set correctly
Iris Clark
iris.clark at oracle.com
Fri Jan 18 19:30:46 UTC 2013
Publically accessible URL for this bug description (since this is going to a public mailing list):
http://bugs.sun.com/view_bug.do?bug_id=6519127
-----Original Message-----
From: Alexey Utkin
Sent: Friday, January 18, 2013 7:31 AM
To: core-libs-dev; Alan Bateman
Subject: Review request: JDK-6519127 Vista: user.home property not set correctly
Hi Everyone,
Please review the fix.
Bug description:
https://jbs.oracle.com/bugs/browse/JDK-6519127
Here is the suggested fix:
http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-6519127/webrev.02/
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.
[http://blogs.msdn.com/b/oldnewthing/archive/2003/11/03/55532.aspx]
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.
http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.htmll#msvc32
Regards,
-uta
More information about the core-libs-dev
mailing list